|
|
@@ -10,4 +10,69 @@ class TriangleCheckerTest { |
|
|
|
void checkTriangleNormal() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NORMAL,TriangleChecker.checkTriangle( 10 ,5,6) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleISOSCELES_AB() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.ISOSCELES,TriangleChecker.checkTriangle( 10 ,10,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleISOSCELES_BC() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.ISOSCELES,TriangleChecker.checkTriangle( 10 ,5,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleISOSCELES_AC() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.ISOSCELES,TriangleChecker.checkTriangle( 10 ,5,10) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangle_EQUILATERAL() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.EQUILATERAL,TriangleChecker.checkTriangle( 10 ,10,10) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_A() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 0 ,10,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_B() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,0,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_C() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,5,0) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_minusA() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( -2 ,10,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_minusB() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,-2,5) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_minusC() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,5,-2) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_AB_C() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,2,13) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_AC_B() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 10 ,13,2) ); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangleNONE_BC_A() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle( 13 ,10,2) ); |
|
|
|
} |
|
|
|
} |