public void ShouldReturnCorrectSuperHappyAreaSumOfShapeCollection() { //Arrange var shapeCollection = new ShapeCollection(); shapeCollection.Add(new Triangle(2, 3) { Mood = MoodTypes.SuperHappy }); //3 shapeCollection.Add(new Square(2) { Mood = MoodTypes.SuperHappy }); //4 shapeCollection.Add(new Square(3) { Mood = MoodTypes.SuperHappy }); //9 shapeCollection.Add(new Circle(5) { Mood = MoodTypes.SuperHappy }); //78.5875 //Act //Assert Assert.AreEqual(shapeCollection.AreaSum(), 94.5375f * 3); }
public void ShouldReturnCorrectAreaSumOfShapeCollection() { //Arrange var shapeCollection = new ShapeCollection(); shapeCollection.Add(new Triangle(2, 3)); //3 shapeCollection.Add(new Square(2)); //4 shapeCollection.Add(new Square(3)); //9 shapeCollection.Add(new Circle(5)); //78.5875 //Act //Assert Assert.AreEqual(shapeCollection.AreaSum(), 94.5375f); }