Пример #1
0
 @Test
 public void testCopyConstructor() {
   Othello o1 = new Othello();
   o1.restart(Piece.BLACK);
   Othello o2 = new Othello(o1);
   o2.setTurn(Piece.WHITE);
   assertEquals(Piece.BLACK, o1.getTurn());
   assertEquals(Piece.WHITE, o2.getTurn());
 }
Пример #2
0
 @Test
 public void testSetTurn() {
   Othello o = new Othello();
   o.setTurn(Piece.WHITE);
   assertEquals(o.getTurn(), Piece.WHITE);
 }