示例#1
0
        public void HeightAndWidthZero_AreaZero()
        {
            RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator();
            int rectangleArea = rectangleAreaCalculator.RectangleArea(0, 0);

            Assert.Equal(0, rectangleArea);
        }
示例#2
0
        public void HeightAndWidthPositive_Works()
        {
            RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator();
            int rectangleArea = rectangleAreaCalculator.RectangleArea(10, 5);

            Assert.Equal(10 * 5, rectangleArea);
        }
示例#3
0
        public void HeightNegative_ArgumentExceptionIsThrown()
        {
            RectangleAreaCalculator rectangleAreaCalculator = new RectangleAreaCalculator();

            Assert.Throws <ArgumentException>(() => rectangleAreaCalculator.RectangleArea(-5, 5));
        }