public void UnboundedWorldEnsureCorrectNumberOfAliveNeighbors() { /* Begin Arrange */ UnboundedWorld my_world = new UnboundedWorld(); /* End Arrange */ /* Begin Act */ my_world.AddCell(4, 4); my_world.AddCell(4, 5); my_world.AddCell(4, 3); List<Cell> expected_alive_neighbors = new List<Cell> { new Cell { X = 4,Y=5}, new Cell { X = 4,Y=3} }; List<Cell> actual_alive_neighbors = my_world.AliveNeighbors(4, 4); int expected_alive_neighbors_count = 2; int actual_alive_neighbors_count = actual_alive_neighbors.Count; /* End Act */ /* Begin Assert */ //Assert.IsTrue(actual_alive_neighbors[0].Equals(new Cell { X = 4, Y = 5 })); //CollectionAssert.AreEqual(expected_alive_neighbors, actual_alive_neighbors); Assert.AreEqual(expected_alive_neighbors_count, actual_alive_neighbors_count); /* End Assert */ }
public void UnBoundedEnsureWorldHasZeroCells() { UnboundedWorld instance = new UnboundedWorld(); int expected_number_of_cells = 0; int actual_number_of_cells = instance.CellCount(); Assert.AreEqual(expected_number_of_cells, actual_number_of_cells); }
public void UnboundedEnsureThereAreCells() { UnboundedWorld instance = new UnboundedWorld(); int x = 4; int y = 3; instance.AddCell(x,y); Assert.AreEqual(1, instance.CellCount()); }
public void UnboundedWorldEnsureTheWorldHasZeroCells() { // Arrange UnboundedWorld my_world = new UnboundedWorld(); // Act int expected_number_of_cells = 0; int actual_number_of_cells = my_world.CellCount(); // Assert Assert.AreEqual(expected_number_of_cells, actual_number_of_cells); }
public void UnboundedWorldEnsureThereAreCells() { // Arrange UnboundedWorld my_world = new UnboundedWorld(); // Act int x = 4; int y = 3; my_world.AddCell(x,y); // Assert Assert.AreEqual(1, my_world.CellCount()); }
public void UnboundedWorldEnsureTheWorldHasZeroCells() { /* Begin Arrange */ UnboundedWorld my_world = new UnboundedWorld(); /* End Arrange */ /* Begin Act */ int expected_number_of_cells = 0; int actual_number_of_cells = my_world.CellCount(); /* End Act */ /* Begin Assert */ Assert.AreEqual(expected_number_of_cells, actual_number_of_cells); /* End Assert */ }
public void UnboundedWorldEnsureThereAreCells() { /* Begin Arrange */ UnboundedWorld my_world = new UnboundedWorld(); /* End Arrange */ /* Begin Act */ int x = 4; int y = 3; my_world.AddCell(x,y); /* End Act */ /* Begin Assert */ Assert.AreEqual(1, my_world.CellCount()); /* End Assert */ }
public void UnboundedEnsureCorrectNumberOfAliveNeighbors() { UnboundedWorld instance = new UnboundedWorld(); instance.AddCell(4, 4); instance.AddCell(4, 5); instance.AddCell(4, 3); List<Cell> expected_alive_neighbors = new List<Cell> { new Cell {X = 4, Y = 5 }, new Cell {X = 4, Y = 3 } }; List<Cell> actual_alive_neighbors = instance.AliveNeighbors(4,4); int expected_alive_neighbors_count = 2; int actual_alive_neighbors_count = actual_alive_neighbors.Count; //Assert.IsTrue(actual_alive_neighbors[0].Equals(new Cell { X = 4, Y = 5 })); //CollectionAssert.AreEqual(expected_alive_neighbors, actual_alive_neighbors); Assert.AreEqual(expected_alive_neighbors_count, actual_alive_neighbors_count); }
public void UnboundedWorldEnsureICanCreateInstance() { UnboundedWorld my_world = new UnboundedWorld(); Assert.IsNotNull(my_world); }
public void UnboundedEnsureICanCreateAnInstance() { UnboundedWorld instance = new UnboundedWorld(); Assert.IsNotNull(instance); }