Example #1
0
 @Test
 public void typeOfTriangle_noSidesAreEqual_scalene() {
   Triangle triangle = new Triangle(10, 15, 11);
   assertEquals("It's a scalene!", triangle.typeOfTriangle());
 }
Example #2
0
 @Test
 public void typeOfTriangle_sideThreeSideOneEqual_isosceles() {
   Triangle triangle = new Triangle(10, 15, 10);
   assertEquals("It's an isosceles!", triangle.typeOfTriangle());
 }
Example #3
0
 @Test
 public void isATriangle_sideOneSideTwoLessThanSideThree_true() {
   Triangle triangle = new Triangle(10, 10, 15);
   assertEquals(true, triangle.isATriangle());
 }
Example #4
0
 @Test
 public void typeOfTriangle_sideOneSideTwoEqualSideTwoSideThreeEqual_equilateral() {
   Triangle triangle = new Triangle(10, 10, 10);
   assertEquals("It's an equilateral!", triangle.typeOfTriangle());
 }
Example #5
0
 @Test
 public void isATriangle_sideThreeSideOneGreaterThanSideTwo_false() {
   Triangle triangle = new Triangle(10, 25, 10);
   assertEquals(false, triangle.isATriangle());
 }