Repository zu Prog3_A_Prak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TriangleCheckerTest.java 762B

12345678910111213141516171819202122232425
  1. package Prak1;
  2. import org.junit.jupiter.api.Test;
  3. import static org.junit.jupiter.api.Assertions.*;
  4. class TriangleCheckerTest {
  5. @Test
  6. void checkTriangle_Normal () {
  7. assertEquals(TriangleChecker.TriangleType.NORMAL, TriangleChecker.checkTriangle(15, 12, 22));
  8. }
  9. @Test
  10. void checkTriangle_gleichseitig () {
  11. assertEquals(TriangleChecker.TriangleType.EQUILATERAL, TriangleChecker.checkTriangle(10, 10, 10));
  12. }
  13. @Test
  14. void checkTriangle_none() {
  15. assertEquals(TriangleChecker.TriangleType.NONE, TriangleChecker.checkTriangle(-10, 0, 10));
  16. }
  17. @Test
  18. void checkTriangle_gleichschenklig() {
  19. assertEquals(TriangleChecker.TriangleType.ISOSCELES, TriangleChecker.checkTriangle(10, 10, 5));
  20. }
  21. }