|
|
|
|
|
|
|
|
void checkEquilateralTriangle(){ |
|
|
void checkEquilateralTriangle(){ |
|
|
assertEquals(TriangleChecker.TriangleType.EQUILATERAL,TriangleChecker.checkTriangle(1, 1, 1)); |
|
|
assertEquals(TriangleChecker.TriangleType.EQUILATERAL,TriangleChecker.checkTriangle(1, 1, 1)); |
|
|
} |
|
|
} |
|
|
|
|
|
@Test |
|
|
|
|
|
void checkNegativ() { |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(-1, 3, 5)); |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(3, 0, 5)); |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(3, 5, -10)); |
|
|
|
|
|
} |
|
|
|
|
|
@Test |
|
|
|
|
|
void checkLength() { |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(20, 3, 5)); |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(10, 20, 10)); |
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(1, 1, 60)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |