public void MixedAddWalls() { //Arrange Corner corn1 = new Corner(new PointF(0, 0)); Corner corn2 = new Corner(new PointF(10, 0)); Corner corn3 = new Corner(new PointF(10, 10)); Wall wall = new Wall(corn1, corn2); Door door = new Door(corn2, corn3); //Act corn2.AddWalls(wall, door); //Assert IList lWalls = corn2.GetWalls(); Assert.AreEqual(2, lWalls.Count); Assert.AreEqual(wall, lWalls[0]); Assert.AreEqual(door, lWalls[1]); }
public void NullAddWalls() { //Arrange Corner corn1 = new Corner(new PointF(0, 0)); Corner corn2 = new Corner(new PointF(10, 0)); Corner corn3 = new Corner(new PointF(10, 10)); Wall wall1 = new Wall(corn1, corn2); Wall wall2 = null; //Act corn2.AddWalls(wall2, wall1); //Assert IList lWalls = corn2.GetWalls(); Assert.AreEqual(1, lWalls.Count); Assert.AreEqual(wall1, lWalls[0]); }