public static void Main(string[] args) { while (true) { Console.WriteLine("Enter 1: To enter the dimensions of triangle"); Console.WriteLine("Enter 2: To Exit"); int casevalue = Int32.Parse(Console.ReadLine()); switch (casevalue) { case 1: Console.WriteLine("Please write the values for sides of Traingle"); Console.WriteLine("Please write the values of side A"); int side_A = Int32.Parse(Console.ReadLine()); Console.WriteLine("Please write the values of side B"); int side_B = Int32.Parse(Console.ReadLine()); Console.WriteLine("Please write the values of side C"); int side_C = Int32.Parse(Console.ReadLine()); string answer = TriangleSolverTest.Analyze(side_A, side_B, side_C); Console.WriteLine(answer); break; case 2: Environment.Exit(0); break; default: break; } } }
public void scaleneCheck() { NUnit.Framework.Assert.AreEqual("Scalene Triangle", TriangleSolverTest.Analyze(5, 7, 6)); }
public void isosclesCheck() { NUnit.Framework.Assert.AreEqual("Isoscles Triangle", TriangleSolverTest.Analyze(5, 5, 6)); }
public void equilateralCheck() { NUnit.Framework.Assert.AreEqual("Equilateral Triangle", TriangleSolverTest.Analyze(5, 5, 5)); }
public void AllZeroCheck() { NUnit.Framework.Assert.IsFalse(TriangleSolverTest.triangleExists(0, 0, 0)); }
public void triangleCheck() { NUnit.Framework.Assert.IsTrue(TriangleSolverTest.triangleExists(8, 8, 9)); }
public void negativeCheck() { NUnit.Framework.Assert.IsFalse(TriangleSolverTest.triangleExists(-5, 8, 9)); }