Browse Source

Refactor names of source-method

AIPlayer
FelixKrull 3 years ago
parent
commit
372dcc3b13
  1. 14
      src/test/java/GameTest.java
  2. 4
      src/test/java/PlayerTest.java

14
src/test/java/GameTest.java

@ -2,20 +2,12 @@ import org.junit.jupiter.api.BeforeEach;
public class GameTest { public class GameTest {
private Gameboard gb;
private Player p1;
private Player p2;
private Player p3;
private Player p4;
private Game g;
@BeforeEach @BeforeEach
void setup() { void setup() {
this.gb = new Gameboard();
gb.initGameboard();
p1 = new Player("Rot", 40, 43);
p2 = new Player("Blau", 44, 47);
p3 = new Player("Gelb", 48, 51);
p4 = new Player("Grün", 52, 55);
g = new Game();
} }
} }

4
src/test/java/PlayerTest.java

@ -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(

Loading…
Cancel
Save