Exemple #1
0
        public void GetCircleAreaTes()
        {
            //Arrange
            Circle circle = new Circle(5);

            _areable = new CircleAreaProcessor(circle);
            double expected = 78.53981633974483;
            //Act
            double actual = _areable.GetArea();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public string GetOutput()
        {
            Console.WriteLine("Selezionare: 1.Perimetro, 2.Area");
            int.TryParse(Console.ReadLine(), out int figure);
            switch (figure)
            {
            case 1:
                IAreable area = GeometryFactory.GetAreable();
                return(area.GetArea());

            case 2:
            }
        }
Exemple #3
0
        public void GetTriangleAreaTest()
        {
            //Arrange
            Triangle triangle = new Triangle(6, 9, 3);

            _areable = new TriangleAreaProcessor(triangle);
            double expected = 0;
            //Act
            double actual = _areable.GetArea();

            //Assert
            Assert.AreEqual(expected, actual);
        }
        static void Main(string[] args)
        {
            IAreable areable = GeometryFactory.GetAreable();

            Console.WriteLine($"AAAgfdgfdgfdg {areable.GetArea()}");
        }