Ejemplo n.º 1
0
  @Test
  public void testEqualsCells() {
    GameCell cellOne = new GameCell(5);
    GameCell cellTwo = new GameCell(5);
    assertTrue(cellOne.equals(cellTwo));

    cellTwo.setValue(6);
    assertFalse(cellOne.equals(cellTwo));
  }
Ejemplo n.º 2
0
 @Test
 public void testIsEmpty() {
   assertTrue(gameCell.isEmpty());
 }
Ejemplo n.º 3
0
 @Test
 public void testConstructorWithArgument() {
   GameCell gameCell = new GameCell(5);
   assertEquals(gameCell.getValue(), 5);
 }
Ejemplo n.º 4
0
 @Test
 public void testSetter() {
   gameCell.setValue(9);
   assertEquals(gameCell.getValue(), 9);
 }
Ejemplo n.º 5
0
 @Test
 public void testDefaultConstructor() {
   assertEquals(gameCell.getValue(), 0);
 }