Exemple #1
0
        public void Get_circle_shape_area()
        {
            var moqCircleShape = new Mock <Circle>();
            var shape          = new ShapeChooser();

            var resultCircle = shape.GetShape(moqCircleShape.Object);

            Assert.IsType <double>(resultCircle);
        }
Exemple #2
0
        public void Get_triangle_shape_area()
        {
            var moqTriangleShape = new Mock <Triangle>();
            var shape            = new ShapeChooser();

            var resultTriangle = shape.GetShape(moqTriangleShape.Object);

            Assert.IsType <double>(resultTriangle);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Укажите стороны фигуры через запятую: ");
            string input = Console.ReadLine();


            InputHandler inputHandler = new InputHandler();
            var          digitList    = inputHandler.TransformInput(input);

            ShapeCreator shapeCreator = new ShapeCreator();
            var          shapeForm    = shapeCreator.GetShape(digitList);

            ShapeChooser shapeChooser = new ShapeChooser();
            var          area         = shapeChooser.GetShape(shapeForm);

            Console.WriteLine("Площадь фигуры = " + area);
            Console.ReadLine();
        }