|
|
@ -68,11 +68,11 @@ class LogicTest { |
|
|
|
assertEquals(expectedResult, realResult); |
|
|
|
} |
|
|
|
|
|
|
|
@ParameterizedTest(name = "[{index}] {0} Win for Player {2} {1}") |
|
|
|
@ParameterizedTest(name = "[{index}] {0} with {1}") |
|
|
|
@MethodSource("playfieldForScore") |
|
|
|
void calcScoreTest(String testName, int[][] playfield, int player, int expectedResult) { |
|
|
|
void calcScoreTest(String testName, int[][] playfield, int expectedResult) { |
|
|
|
|
|
|
|
int realResult = testObj.calcScore(playfield, player); |
|
|
|
int realResult = testObj.calcScore(playfield); |
|
|
|
|
|
|
|
assertEquals(expectedResult, realResult); |
|
|
|
} |
|
|
@ -156,13 +156,13 @@ class LogicTest { |
|
|
|
{2, 1, 2, 2, 1, 2}, |
|
|
|
{2, 1, 2, 2, 1, 2}}; |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("emptyField", new int[6][6], 1, 1000), |
|
|
|
Arguments.of("9 chips played", playfield1, 1, 1090), |
|
|
|
Arguments.of("first row filled", playfield2, 1, 1120), |
|
|
|
Arguments.of("2 rows filled", playfield3, 1, 1240), |
|
|
|
Arguments.of("first column filled", playfield4, 1, 1120), |
|
|
|
Arguments.of("2 column filled", playfield5, 1, 1240), |
|
|
|
Arguments.of("fullyFilled", playfield6, 1, 2580) |
|
|
|
Arguments.of("emptyField", new int[6][6], 1000), |
|
|
|
Arguments.of("9 chips played", playfield1, 1090), |
|
|
|
Arguments.of("first row filled", playfield2, 1120), |
|
|
|
Arguments.of("2 rows filled", playfield3, 1240), |
|
|
|
Arguments.of("first column filled", playfield4, 1120), |
|
|
|
Arguments.of("2 column filled", playfield5, 1240), |
|
|
|
Arguments.of("fullyFilled", playfield6, 2580) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|