public void RectangleAreaTest()
        {
            Rectangles testRectangle = new Rectangles();
            testRectangle.Side1Top = 8;
            testRectangle.Side2Right = 4;

            Assert.AreEqual(testRectangle.Area(), 32);
        }
        public void RectanglePerimeterTest()
        {
            Rectangles testRectangle = new Rectangles();
            testRectangle.Side1Top = 8;
            testRectangle.Side2Right = 4;

            Assert.AreEqual(testRectangle.Perimeter(), 24);
        }
Example #3
0
        public Shape getShape(string shapeType)
        {
            Shape shape = null;

            switch (shapeType)
            {
            case "CIRCLE":
                shape = new Circle();
                break;

            case "RECTANGLE":
                shape = new Rectangles();
                break;
            }
            return(shape);
        }
Example #4
0
        /// <summary>
        /// method to getshpaes
        /// </summary>
        /// <param name="shapeType"></param>
        /// <returns></returns>
        public Shape getShape(string shapeType)
        {
            Shape shape = null;

            switch (shapeType)
            {
            case "CIRCLE":
                shape = new Circle();
                break;

            case "RECTANGLE":
                shape = new Rectangles();
                break;

            case "LINE":
                shape = new Lines();
                break;

            case "STRING":
                shape = new TextGraphic();
                break;
            }
            return(shape);
        }