コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: hemmerling/codingdojo
 public void LivingCellHasOneNeighbourAndDies()
 {
     var x = new GameOfLife();
     x.setNumberOfNeighbour(1);
     Boolean isAlive = x.survives();
     Assert.IsFalse(isAlive);
 }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: hemmerling/codingdojo
 public void LivingCellHasTwoNeighbourAndLife()
 {
     var x = new GameOfLife();
     x.setNumberOfNeighbour(2);
     Boolean isAlive = x.survives();
     Assert.IsTrue(isAlive);
 }
コード例 #3
0
ファイル: UnitTest1.cs プロジェクト: hemmerling/codingdojo
 public void DeadCellHasThreeNeighbourAndLives()
 {
     var x = new GameOfLife();
     x.setAlive(false);
     x.setNumberOfNeighbour(3);
     Boolean isAlive = x.survives();
     Assert.IsTrue(isAlive);
 }