Repository zu Vorlesung Prog3
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 716B

12345678910111213141516171819202122232425262728
  1. import org.junit.jupiter.api.Test;
  2. import static org.junit.jupiter.api.Assertions.*;
  3. class TriangleCheckerTest {
  4. @Test
  5. void checkTriangle() {
  6. float a = 3;
  7. float b = 4;
  8. float c = 5;
  9. TriangleChecker.TriangleType result = TriangleChecker.checkTriangle(a, b, c);
  10. System.out.println(result);
  11. assertEquals(TriangleChecker.TriangleType.NORMAL, result, "Normales Dreieck");
  12. float d = 4;
  13. float e = 4;
  14. float f = 4;
  15. TriangleChecker.TriangleType result2 = TriangleChecker.checkTriangle(d, e, f);
  16. System.out.println(result2);
  17. assertEquals(TriangleChecker.TriangleType.EQUILATERAL, result2, "Gleichseitiges");
  18. }
  19. }