public void HeightAndWidthZero_AreaZero() { RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator(); int rectangleArea = rectangleAreaCalculator.RectangleArea(0, 0); Assert.Equal(0, rectangleArea); }
public void HeightAndWidthPositive_Works() { RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator(); int rectangleArea = rectangleAreaCalculator.RectangleArea(10, 5); Assert.Equal(10 * 5, rectangleArea); }
public void HeightNegative_ArgumentExceptionIsThrown() { RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator(); Assert.Throws <ArgumentException>(() => rectangleAreaCalculator.RectangleArea(-5, 5)); }