|
@ -66,4 +66,15 @@ class ChessBoardTest { |
|
|
}; |
|
|
}; |
|
|
assertArrayEquals(expectedArray, chessBoard.getCellSymbols()); |
|
|
assertArrayEquals(expectedArray, chessBoard.getCellSymbols()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void isCellInBoard() { |
|
|
|
|
|
assertTrue(chessBoard.isCellInBoard(0, 0)); |
|
|
|
|
|
assertTrue(chessBoard.isCellInBoard(7, 7)); |
|
|
|
|
|
assertTrue(chessBoard.isCellInBoard(2, 1)); |
|
|
|
|
|
assertTrue(chessBoard.isCellInBoard(5, 7)); |
|
|
|
|
|
assertFalse(chessBoard.isCellInBoard(-1, 0)); |
|
|
|
|
|
assertFalse(chessBoard.isCellInBoard(4, 8)); |
|
|
|
|
|
assertFalse(chessBoard.isCellInBoard(10, 20)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |