public void ShouldCalculateAreaForSquare() { var shapes = new [] { new SquareElement(2F) }; var area = new AreaCalculatorVisitor(shapes) .Sum(); Assert.AreEqual(area, 4f); }
public void ShouldCalculateAreaForCircle() { var shapes = new [] { new CircleElement(2F) }; var area = new AreaCalculatorVisitor(shapes) .Sum(); Assert.AreEqual(area, 12.566371f); }