Example #1
0
        public void Test_CircleSquare_IsCorrect()
        {
            var rad = 5;
            var c   = FigureFabric.CreateCircle(rad);

            Assert.IsTrue(Math.Abs(c.Square - 78.539) < error);
        }
Example #2
0
 public void Test_Triangle_InvalidSide_ThrowsException(double a, double b, double c)
 {
     FigureFabric.CreateTriange(a, b, c);
 }
Example #3
0
        public void Test_Triangle_IsRectangular()
        {
            var t = FigureFabric.CreateTriange(2, 3, 3.605);

            Assert.IsTrue(((Triangle)t).IsRectangular);
        }
Example #4
0
        public void Test_TriangleSquare_IsCorrect()
        {
            var c = FigureFabric.CreateTriange(2, 3, 3.605);

            Assert.IsTrue(Math.Abs(c.Square - 3) < error);
        }
Example #5
0
 public void Test_Circle_InvalidRadius_ThrowsException()
 {
     var c = FigureFabric.CreateCircle(-5);
 }