Exemple #1
0
        public void WhatAreaOtherFigure_halfSA2B8andAngleNo_return50x()
        {
            List <double> side = new List <double>()
            {
                2, 8
            };
            List <double> angle = new List <double>();

            double expected = 50.265;
            double delta    = 0.001;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual, delta);
        }
Exemple #2
0
        public void WhatAreaOtherFigure_side3andAngleNo_return7x()
        {
            List <double> side = new List <double>()
            {
                5, 5, 3
            };
            List <double> angle = new List <double>();

            double expected = 7.154;
            double delta    = 0.001;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual, delta);
        }
Exemple #3
0
        public void WhatAreaOtherFigure_allAriaTriangleinFiguge()
        {
            List <double> side = new List <double>()
            {
                5, 5, 5, 5
            };
            List <double> angle = new List <double>()
            {
                90, 90
            };

            double expected = 25;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual);
        }
Exemple #4
0
        public void WhatAreaOtherFigure_area8angle()
        {
            List <double> side = new List <double>()
            {
                8, 8, 8, 8, 8, 8, 8, 8
            };
            List <double> angle = new List <double>()
            {
                135, 136, 135, 135
            };

            double expected = 154.111;
            double delta    = 0.001;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual, delta);
        }
Exemple #5
0
        public void WhatAreaOtherFigure_area7angle()
        {
            List <double> side = new List <double>()
            {
                7, 7, 7, 7, 7, 7, 7
            };
            List <double> angle = new List <double>()
            {
                128, 128, 128
            };

            double expected = 106.918;
            double delta    = 0.001;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual, delta);
        }
Exemple #6
0
        public void WhatAreaOtherFigure_area6angle()
        {
            List <double> side = new List <double>()
            {
                6, 6, 6, 6, 6, 6
            };
            List <double> angle = new List <double>()
            {
                120, 120, 120
            };

            double expected = 93.530;
            double delta    = 0.001;

            double actual = MathGfigure.WhatAreaOtherFigure(side, angle);

            Assert.AreEqual(expected, actual, delta);
        }
Exemple #7
0
        public void WhatAreaOtherFigure_ratioSideToAngle()
        {
            List <double> side = new List <double>()
            {
                5, 5, 5, 5, 5, 5
            };
            List <double> angle = new List <double>()
            {
                90, 90, 90, 90
            };

            double expected = 0;

            double actualA = MathGfigure.WhatAreaOtherFigure(side, angle);

            angle.Clear();
            double[] b = { 90, 90 };
            angle.AddRange(b);
            double actualB = MathGfigure.WhatAreaOtherFigure(side, angle);

            double actual = actualA + actualB;

            Assert.AreEqual(expected, actual);
        }