コード例 #1
0
        public void SixFor2X3Rectangle()
        {
            var myRectangle = new Rectangle {
                Height = 2, Width = 3
            };

            Assert.AreEqual(6, AreaCalculator.CalculateRectArea(myRectangle));
        }
コード例 #2
0
        public void TwentyFor4X5RectangleFromSquare()
        {
            Rectangle newRectangle = new Square();

            newRectangle.Width  = 4;
            newRectangle.Height = 5;
            Assert.AreEqual(20, AreaCalculator.CalculateRectArea(newRectangle));
        }