コード例 #1
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldRemainAliveWhenReviveIsCalledOnAliveCell() {
    Cell cell = new Cell(true);

    cell.revive();

    assertEquals(new Cell(true).format(), cell.format());
  }
コード例 #2
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldReviveDeadCellWhenReviveIsCalled() {
    Cell cell = new Cell(false);

    cell.revive();

    assertEquals(new Cell(true).format(), cell.format());
  }
コード例 #3
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldRemainDeadWhenKillIsCalledOnDeadCell() {
    Cell cell = new Cell(false);

    cell.kill();

    assertEquals(new Cell(false).format(), cell.format());
  }
コード例 #4
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldKillAliveCellWhenKillIsCalled() {
    Cell cell = new Cell(true);

    cell.kill();

    assertEquals(new Cell(false).format(), cell.format());
  }
コード例 #5
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldReturnXIfCellIsAliveWhenFormatIsCalled() {
    Cell cell = new Cell(true);

    assertEquals("X", cell.format());
  }
コード例 #6
0
ファイル: CellTest.java プロジェクト: abhisheksp/GameofLife
  @Test
  public void shouldReturnHiphenIfCellIsDeadWhenFormatIsCalled() {
    Cell cell = new Cell(false);

    assertEquals("-", cell.format());
  }