public void GetNextState_DeadCell_2LiveNeighbours_StaysDead() { var cell = CellTestHelper.MakeDeadCell(); List <State> twoNeighbours = CellTestHelper.CreateConwayNeighboursList(2); CellTestHelper.EvolveCell(cell, twoNeighbours); Assert.IsTrue(cell.CurrentState == State.DEAD); }
public void GetNextState_DeadCell_0LiveNeighbours_Dies() { var cell = CellTestHelper.MakeDeadCell(); List <State> zeroNeighbours = CellTestHelper.CreateConwayNeighboursList(0); CellTestHelper.EvolveCell(cell, zeroNeighbours); Assert.IsTrue(cell.CurrentState == State.DEAD); }
public void GetNextState_DeadCell_3LiveNeighbours_BecomesAlive() { var cell = CellTestHelper.MakeDeadCell(); List <State> threeNeighbours = CellTestHelper.CreateConwayNeighboursList(3); CellTestHelper.EvolveCell(cell, threeNeighbours); Assert.IsTrue(cell.CurrentState == State.ALIVE); }