Esempio n. 1
0
        public void CalculateSquareGeron()
        {
            IShape triangle = new Triangle(15, 13, 4);
            var    square   = triangle.CalculateSquare();

            Assert.IsTrue(Math.Abs(24 - square) < Epsilon);
            Assert.Pass();
        }
Esempio n. 2
0
        public void CalculateSquareOrdinary()
        {
            IShape triangle = new Triangle(100.83, 100.84, 100.85);
            var    square   = triangle.CalculateSquare();

            Assert.IsTrue(Math.Abs(4403.1786 - square) < Epsilon);
            Assert.Pass();
        }
Esempio n. 3
0
        public void CalculateSquareRectangular()
        {
            IShape triangle = new Triangle(3, 4, 5);
            var    square   = triangle.CalculateSquare();

            Assert.IsTrue(Math.Abs((3 * 4) / 2 - square) < Epsilon);
            Assert.Pass();
        }