public void RightAreaTest() { RightTriangle triangle=new RightTriangle(3,4,5); double area = triangle.Area; Assert.AreEqual(6,area,"Right Area"); }
public static Triangle Type(double a, double b, int c) { Triangle tr; if (a == b) { tr = new IsoscelesTriangle(a, b, c); Console.WriteLine("You got the Isosceles Triangle "); } else if (c == 90) { tr = new RightTriangle(a, b, c); Console.WriteLine("You got the Right Triangle "); } else { tr = new Triangle(a, b, c); Console.WriteLine("You got the Simple Triangle "); } return(tr); }
public void ArgumentExceptionTest() { RightTriangle triangle = new RightTriangle(3, 4, 6); }