|
12345678910111213141516171819202122232425262728293031323334 |
- package praktikum02;
-
- import org.junit.jupiter.api.Test;
-
- import static org.junit.jupiter.api.Assertions.*;
-
- class TriangleCheckerTest {
-
- @Test
- void checkTriangle() {
- assertEquals(TriangleChecker.TriangleType.NORMAL,TriangleChecker.checkTriangle(5, 6, 7));
- }
- @Test
- void checkEquilateralTriangle(){
- assertEquals(TriangleChecker.TriangleType.EQUILATERAL,TriangleChecker.checkTriangle(1, 1, 1));
- }
- @Test
- void checkIsocelesTriangle(){
- assertEquals(TriangleChecker.TriangleType.ISOSCELES,TriangleChecker.checkTriangle(5, 5, 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));
- }
-
- }
|