public void revive_a_dead_cell_with_exactly_three_live_neighbours() { var cell = new DeadCell(); _neighbours.Add(new LiveCell().Some <Cell>()) .Add(new LiveCell().Some <Cell>()) .Add(new LiveCell().Some <Cell>()); var newCell = cell.Tick(_neighbours); newCell.Should().BeOfType <LiveCell>(); }
public void Come_Back_To_Life_With_Three_Live_Neighbours() { var neighbours = new Neighbours(); neighbours.Add(new LiveCell(null)); neighbours.Add(new LiveCell(null)); neighbours.Add(new LiveCell(null)); var cell = new DeadCell(neighbours); var cellState = cell.Tick(); Assert.That(cellState, Is.TypeOf <LiveCell>()); }