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