|
@ -52,6 +52,19 @@ class LogicTest { |
|
|
assertEquals(expectedResult, realResult); |
|
|
assertEquals(expectedResult, realResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void changePlayerTo1Test() { |
|
|
|
|
|
int[][] playfield = new int[6][6]; |
|
|
|
|
|
int column = 0; |
|
|
|
|
|
int player = 2; |
|
|
|
|
|
int expectedResult = 1; |
|
|
|
|
|
|
|
|
|
|
|
testObj.playChip(playfield, column, player); |
|
|
|
|
|
int realResult = testObj.currentPlayer; |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(expectedResult, realResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private static Stream<Arguments> playfieldResults() { |
|
|
private static Stream<Arguments> playfieldResults() { |
|
|
int[][] playfield1 = {{0, 0, 0, 0, 0, 0}, |
|
|
int[][] playfield1 = {{0, 0, 0, 0, 0, 0}, |
|
|
{0, 0, 0, 0, 0, 0}, |
|
|
{0, 0, 0, 0, 0, 0}, |
|
|