Browse Source

tictactoe: refactored test code

tictactoe
Malte Schellhardt 3 years ago
committed by Lorenz Hohmann
parent
commit
27cadc4097
  1. 6
      src/test/java/de/tims/tictactoe/GameLogicTest.java

6
src/test/java/de/tims/tictactoe/GameLogicTest.java

@ -27,7 +27,7 @@ class GameLogicTest {
@Test
void createGameLogicTest() {
GameLogic expectedResult = game;
GameLogic expectedResult = this.game;
GameLogic realResult = new GameLogic(size);
assertEquals(expectedResult.getClass(), realResult.getClass());
@ -36,12 +36,12 @@ class GameLogicTest {
@Test
void getBoardTest() {
int[][] expectedResult = new int[3][3];
int[][] realResult = game.getBoard();
int[][] realResult = this.game.getBoard();
assertArrayEquals(expectedResult, realResult);
}
@ParameterizedTest(name = "[{index}] {0} -> {1}")
@ParameterizedTest(name = "[{index}] {0} -> {2} fields")
@MethodSource("testCasesForCountPlayfields")
void fieldCountTest(String testName, int size, int expectedResult) {
GameLogic game = new GameLogic(size);

Loading…
Cancel
Save