From 27cadc409799cfcecc9c04f18322f6f26e0c0c3d Mon Sep 17 00:00:00 2001 From: Malte Schellhardt Date: Sun, 30 Jan 2022 14:18:15 +0100 Subject: [PATCH] tictactoe: refactored test code --- src/test/java/de/tims/tictactoe/GameLogicTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/de/tims/tictactoe/GameLogicTest.java b/src/test/java/de/tims/tictactoe/GameLogicTest.java index f37fdb0..1c4cf18 100644 --- a/src/test/java/de/tims/tictactoe/GameLogicTest.java +++ b/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);