|
|
@@ -10,9 +10,23 @@ class TriangleCheckerTest { |
|
|
|
void checkTriangle() { |
|
|
|
assertEquals(TriangleChecker.TriangleType.NORMAL, TriangleChecker.checkTriangle(5, 6, 7)); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkGleichseitig() { |
|
|
|
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)); |
|
|
|
} |
|
|
|
|
|
|
|
} |