Esempio n. 1
0
        public void TestTrianglePerimeter()
        {
            int    i = 0;
            double sideA, sideB, sideC, perimeter;

            while (i <= 10000)
            {
                sideA = random.NextDouble();
                sideB = random.NextDouble();
                sideC = random.NextDouble();
                Triangle triangle = new Triangle(sideA, sideB, sideC);
                perimeter = sideA + sideB + sideC;
                Assert.AreEqual(perimeter, triangle.CalcPerimetr());
                i++;
            }
        }