Browse Source

5.11.24 TriangleCheckerTest mit 6 Testfällen

master
marti 2 weeks ago
parent
commit
bfcccf814a
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      Test/praktikum02/TriangleCheckerTest.java

+ 13
- 0
Test/praktikum02/TriangleCheckerTest.java View File

@@ -14,4 +14,17 @@ class TriangleCheckerTest {
void checkEquilateralTriangle(){
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));
}

}

Loading…
Cancel
Save