Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @Test
  2. public void testUpdateBoardStateCheckMate() throws InvalidMoveException {
  3. // given
  4. Board board = new Board();
  5. board.getMoveHistory().add(createDummyMove(board));
  6. board.setPieceAt(Piece.WHITE_ROOK, new Coordinate(0, 1));
  7. board.setPieceAt(Piece.WHITE_ROOK, new Coordinate(1, 0));
  8. board.setPieceAt(Piece.BLACK_KING, new Coordinate(4, 0));
  9.  
  10. // when
  11. BoardManager boardManager = new BoardManager(board);
  12. BoardState boardState = boardManager.updateBoardState();
  13.  
  14. // then
  15. assertEquals(BoardState.CHECK_MATE, boardState);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement