diff --git a/.idea/misc.xml b/.idea/misc.xml
index 6bc01a8..c3dfb30 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/test/ch/zhaw/catan/SiedlerBoardTest.java b/test/ch/zhaw/catan/SiedlerBoardTest.java
index 8452824..ccaa83d 100644
--- a/test/ch/zhaw/catan/SiedlerBoardTest.java
+++ b/test/ch/zhaw/catan/SiedlerBoardTest.java
@@ -12,11 +12,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class SiedlerBoardTest {
+ /**
+ * To Test getLongestRoad in SiedlerBoard
+ */
@Nested
class LongestRoadTest {
- /**
- * To Test getLongestRoad in SiedlerBoard
- */
List factionList = Arrays.asList(Config.Faction.values());
diff --git a/test/ch/zhaw/catan/SiedlerGameTest.java b/test/ch/zhaw/catan/SiedlerGameTest.java
index a1045e0..a79fe38 100644
--- a/test/ch/zhaw/catan/SiedlerGameTest.java
+++ b/test/ch/zhaw/catan/SiedlerGameTest.java
@@ -20,7 +20,21 @@ import java.util.List;
*
*/
-
+/**
+ * @class SiedlerGameTest
+ *
+ * contains all of the test cases for SiedlerGame class.
+ * The Test cases are categorized into
+ * - Positive TestCases
+ * Tests the methods of SiedlerGame with the intended values
+ *
+ * - Negative TestCases
+ * Tests the methods of SiedlerGame with values, that results to errors and failure
+ *
+ * - SystemTestCases
+ * Tests the coordination of all methods and simulates a game with all moves programmed
+ * Checks if the methods are being executed and the values are set correctly
+ */
public class SiedlerGameTest {
private final static int DEFAULT_WINPOINTS = 5;
@@ -40,7 +54,7 @@ public class SiedlerGameTest {
);
/**
- * START_ROADS_POSITION
+ * Property START_ROADS_POSITION
*
* Lists all endpoints of roads for every faction in the initialization phase.
* Each faction is assigned to a specific Road, which represents as a tuple of 2 points
@@ -92,16 +106,15 @@ public class SiedlerGameTest {
@Test
@DisplayName("Test")
public void TestHandle7() {
-
SiedlerGame game = startGame();
}
}
/**
- * @Class NegtiveTestcases
+ * @Class NegAtiveTestcases
*
- * This class contains all negative test cases
+ * contains all negative test cases
*/
@Nested
@DisplayName("Negative test cases")
@@ -190,7 +203,7 @@ public class SiedlerGameTest {
class SystemTestcases {
/**
- * This will test if the players can place initial settlements and roads
+ * TestS if the players can place initial settlements and roads
*/
@Test
@DisplayName("2 Players initialize a settlement and position")
@@ -217,6 +230,18 @@ public class SiedlerGameTest {
SiedlerGame game = gameAfterSetupPhase();
throwDiceSeveralTimes(game, 5, 5);
+ throwDiceSeveralTimes(game, 5, 5);
+ throwDiceSeveralTimes(game, 5, 5);
+ throwDiceSeveralTimes(game, 5, 5);
+ throwDiceSeveralTimes(game, 5, 5);
+
+ game.switchToNextPlayer();
+
+ throwDiceSeveralTimes(game, 6, 5);
+ //throwDiceSeveralTimes(game, 6, 5);
+ //throwDiceSeveralTimes(game, 6, 5);
+ //throwDiceSeveralTimes(game, 6, 5);
+ //throwDiceSeveralTimes(game, 6, 5);
soutDistribution(game);
}
@@ -295,8 +320,10 @@ public class SiedlerGameTest {
* @param amountDiceThrows Type int, The amount of dice throws
*/
private static void throwDiceSeveralTimes(SiedlerGame game, int dice, int amountDiceThrows) {
+
+ //System.out.println(game.getCurrentPlayerFaction().toString() + " got " + dice + " and throw " + amountDiceThrows + " times");
+
for (int i = 0; i < amountDiceThrows; i++) {
- System.out.println(game.getCurrentPlayerFaction().toString());
game.throwDice(dice);
}
}