public void WhenOneDeadCell_ReturnsSameState() { const string input = "1,1\n."; var game = new GameOfLife(); var nextGeneration = game.Next(input); Assert.AreEqual(input, nextGeneration); }
public void WhenFieldWithDeadAndAliveCell_ReturnsTwoDeadCells() { const string inputWithDeadAndAlive = "1,2\n.*"; const string expectedWithTwoDeadCells = "1,2\n.."; var game = new GameOfLife(); var nextGeneration = game.Next(inputWithDeadAndAlive); Assert.AreEqual(expectedWithTwoDeadCells, nextGeneration); }
public void WhenOneAliveCell_ReturnsDeadCell() { const string input = "1,1\n*"; const string expectedWithDeadCell = "1,1\n."; var game = new GameOfLife(); var nextGeneration = game.Next(input); Assert.AreEqual(expectedWithDeadCell, nextGeneration); }