public void ShouldCellExistWhenWasAdded() { Board b = new Board(); b.AddCell(1, 1); Assert.IsTrue(b.IsCellExist(1, 1)); }
public void ShouldCellNoneExistWhenWasRemoved() { Board b = new Board(); b.AddCell(1, 1); b.RemoveCell(1, 1); Assert.IsFalse(b.IsCellExist(1, 1)); }
public void ShouldCellDieWhenIsLonely() { Board b = new Board(); b.AddCell(1,1); b.NextState(); Assert.IsFalse(b.IsCellExist(1,1)); }
public void ShouldLivingCellDieWhenHasLessThanTwoNeighbours() { Board b = new Board(); b.AddCell(2, 2); b.AddCell(3, 2); b.NextState(); Assert.IsFalse(b.IsCellExist(2, 2)); }
public void ShouldLivingCellStillLiveWhenHasTwoOrThreeNeighbours() { // test for two neighbours Board b = new Board(); b.AddCell(2, 2); b.AddCell(3, 2); b.AddCell(2, 3); b.NextState(); Assert.IsTrue(b.IsCellExist(2, 2)); // test for three neighbours b = new Board(); b.AddCell(2, 2); b.AddCell(3, 2); b.AddCell(2, 3); b.AddCell(3, 3); b.NextState(); Assert.IsTrue(b.IsCellExist(2, 2)); }