public void GenerateNext_ShouldReturnAValidGrid_ForDifferentInput() { bool[,] grid = new bool[4, 2]; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("4 x 2\n..\n..\n..\n..", game.GenerateNext()); }
public void GenerateNext_ShouldReturnAValidGrid() { bool[,] grid = new bool[3, 3]; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("3 x 3\n...\n...\n...", game.GenerateNext()); }
public void GenerateNext_ShouldReturnDifferentDimensions() { bool[,] grid = new bool[7, 3]; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("7 x 3", game.GenerateNext()); }
public void GenerateNext_ShouldReturnAValidGridFromDifferentInput_IfNotStable() { bool[,] grid = new bool[4, 4]; grid[1, 2] = grid[2, 1] = grid[2, 2] = true; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("4 x 4\n....\n.**.\n.**.\n....", game.GenerateNext()); }
public void GenerateNext_ShouldReturnValidGridFromInput_IfNotStable() { bool[,] grid = new bool[3, 3]; grid[1, 1] = true; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("3 x 3\n...\n...\n...", game.GenerateNext()); }
public void GenerateNext_ShouldReturnAValidGrid_WithLiveCellsInput() { bool[,] grid = new bool[4, 4]; grid[1, 1] = grid[1, 2] = grid[2, 1] = grid[2, 2] = true; GameOfLife game = new GameOfLife(grid); StringAssert.Contains("4 x 4\n....\n.**.\n.**.\n....", game.GenerateNext()); }