@Test public void shouldRemainAliveWhenReviveIsCalledOnAliveCell() { Cell cell = new Cell(true); cell.revive(); assertEquals(new Cell(true).format(), cell.format()); }
@Test public void shouldReviveDeadCellWhenReviveIsCalled() { Cell cell = new Cell(false); cell.revive(); assertEquals(new Cell(true).format(), cell.format()); }
@Test public void shouldRemainDeadWhenKillIsCalledOnDeadCell() { Cell cell = new Cell(false); cell.kill(); assertEquals(new Cell(false).format(), cell.format()); }
@Test public void shouldKillAliveCellWhenKillIsCalled() { Cell cell = new Cell(true); cell.kill(); assertEquals(new Cell(false).format(), cell.format()); }
@Test public void shouldReturnXIfCellIsAliveWhenFormatIsCalled() { Cell cell = new Cell(true); assertEquals("X", cell.format()); }
@Test public void shouldReturnHiphenIfCellIsDeadWhenFormatIsCalled() { Cell cell = new Cell(false); assertEquals("-", cell.format()); }