Exemplo n.º 1
0
 public void TestTriangleIsIsosceles()
 {
     TriangleApp.Triangle t = new TriangleApp.Triangle(3.0, 3.0, 2.0);
     bool Expected = true;
     bool Actual = t.isIsosceles();
     Assert.AreEqual(Expected, Actual, "The triangle is not isosceles.");
 }
Exemplo n.º 2
0
 public void TestTriangleIsScalene()
 {
     TriangleApp.Triangle t = new TriangleApp.Triangle(2.0, 3.0, 4.0);
     bool Expected = true;
     bool Actual = t.isScalene();
     Assert.AreEqual(Expected, Actual, "The triangle is not scalene.");
 }
Exemplo n.º 3
0
 public void TestTriangleIsEquilateral()
 {
     TriangleApp.Triangle t = new TriangleApp.Triangle(3.0, 3.0, 3.0);
     bool Expected = true;
     bool Actual = t.isEquilateral();
     Assert.AreEqual(Expected, Actual, "The triangle is not euilateral.");
 }
Exemplo n.º 4
0
        public void TestTriangleIsValid()
        {
            TriangleApp.Triangle t;

            try
            {
               t = new TriangleApp.Triangle(2.0, 3.0, 1.0);
            } catch(Exception)
            {
                Assert.Fail();
            }
        }