Example #1
0
        public void ShouldCalculateAreaOfRectangle()
        {
            var shapeLengths = new List<ShapeLength> {new ShapeLength() {Length = 4}, new ShapeLength() {Length = 5}};
            var rectangle = new Rectangle(shapeLengths);

            Assert.That(rectangle.Area(), Is.EqualTo(20));
        }
Example #2
0
        public void ShouldCalculateAreaOfRectangle()
        {
            var rectangle = new Rectangle {Height = 5, Width = 4};

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