|
@ -48,7 +48,7 @@ public class PlayerTest { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
@MethodSource("FieldStream") |
|
|
|
|
|
|
|
|
@MethodSource("GameWinTestData") |
|
|
void checkGameWin(String testname, Collection<Figure> figures, Collection<Integer> positions, boolean expectedResult) { |
|
|
void checkGameWin(String testname, Collection<Figure> figures, Collection<Integer> positions, boolean expectedResult) { |
|
|
Iterator<Figure> it = figures.iterator(); |
|
|
Iterator<Figure> it = figures.iterator(); |
|
|
Iterator<Integer> it2 = positions.iterator(); |
|
|
Iterator<Integer> it2 = positions.iterator(); |
|
@ -71,7 +71,7 @@ public class PlayerTest { |
|
|
assertThat(calculatedResult).describedAs("Check Win").isEqualTo(expectedResult); |
|
|
assertThat(calculatedResult).describedAs("Check Win").isEqualTo(expectedResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static Stream<Arguments> FieldStream() { |
|
|
|
|
|
|
|
|
static Stream<Arguments> GameWinTestData() { |
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("No Figures in House", |
|
|
Arguments.of("No Figures in House", |
|
|
Arrays.asList( |
|
|
Arrays.asList( |
|
|