|
|
@ -55,8 +55,8 @@ class GameLogicTest { |
|
|
|
|
|
|
|
@ParameterizedTest(name = "[{index}] {0}") |
|
|
|
@MethodSource("testCasesForSetField") |
|
|
|
void setFieldTest(String testName, int row, int column, char player, char[][] expectedResult) { |
|
|
|
this.game.setField(row, column, player); |
|
|
|
void setFieldTest(String testName, int column, int row, char player, char[][] expectedResult) { |
|
|
|
this.game.setField(column, row, player); |
|
|
|
char[][] realResult = this.game.getBoard(); |
|
|
|
|
|
|
|
assertArrayEquals(expectedResult, realResult); |
|
|
@ -77,6 +77,10 @@ class GameLogicTest { |
|
|
|
Arguments.of("set field [0][0] for player 1", 0, 0, 'x', new char[][] |
|
|
|
{{'x', '-', '-'}, |
|
|
|
{'-', '-', '-'}, |
|
|
|
{'-', '-', '-'}}), |
|
|
|
Arguments.of("set field [1][0] for player 2", 1, 0, 'o', new char[][] |
|
|
|
{{'-', '-', '-'}, |
|
|
|
{'o', '-', '-'}, |
|
|
|
{'-', '-', '-'}}) |
|
|
|
); |
|
|
|
} |
|
|
|