Пример #1
0
        public void ShouldCalculateAreaOfSquare()
        {
            var shapeLength = new ShapeLength {Length = 4};
            var ShapeLengths = new List<ShapeLength> {shapeLength};
            Rectangle rectangle = new Square(ShapeLengths);

            Assert.That(rectangle.Area(), Is.EqualTo(16));
        }
Пример #2
0
        public void ShouldCalculateAreaOfSquare()
        {
            Square rectangle = new Square {Height = 4};

            Assert.That(rectangle.Area(), Is.EqualTo(20));
        }