Ejemplo n.º 1
0
        public void Is_A_rectangle_a_square()
        {
            const int expectedArea = 50;
            var       rectangle    = RectangleFactory.GetNewSquare() as Square;

            rectangle.setWidth(5);
            rectangle.setHeight(10);
            Assert.That(rectangle.GetArea(), Is.EqualTo(expectedArea));
        }
Ejemplo n.º 2
0
        public void Can_calculate_area_of_a_sqaure()
        {
            const int expectedArea = 100;
            var       square       = RectangleFactory.GetNewSquare();

            square.setWidth(10);
            square.setHeight(10);
            Assert.That(square.GetArea(), Is.EqualTo(expectedArea));
        }
Ejemplo n.º 3
0
        public void Can_calculate_area_for_a_rectangle()
        {
            const int expectedArea = 50;
            var       rectangle    = RectangleFactory.GetNewRectangle();

            rectangle.setWidth(5);
            rectangle.setHeight(10);
            Assert.That(rectangle.GetArea(), Is.EqualTo(expectedArea));
        }