Ejemplo n.º 1
0
        public void TestSquare3X3()
        {
            var s = new Lsp.Square
            {
                Sidelength = 3
            };

            Assert.AreEqual(9, s.CalculateArea());
        }
Ejemplo n.º 2
0
        public void Test4X5SquareArea()
        {
            Lsp.Shape shapeRectangle = new Lsp.Rectangle
            {
                Width  = 4,
                Height = 5
            };

            Lsp.Shape shapeSquare = new Lsp.Square
            {
                Sidelength = 3
            };

            Assert.AreEqual(20, shapeRectangle.CalculateArea());
            Assert.AreEqual(9, shapeSquare.CalculateArea());
        }