|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package Praktikum02;
-
- import org.junit.jupiter.api.Test;
-
- import static org.junit.jupiter.api.Assertions.*;
-
- class TriangleCheckerTest {
-
- @Test
- void checkTriangleNormal() {
- assertEquals(TriangleChecker.TriangleType.NORMAL,TriangleChecker.checkTriangle(5,2.6f, 3));
-
- }
- @Test
- void checkTriangleNone(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(6,2.9f, 2));
- }
-
- @Test
- void checkTriangleISOSCELES(){
- assertEquals(TriangleChecker.TriangleType.ISOSCELES,TriangleChecker.checkTriangle(6,6, 2));
- }
-
- @Test
- void checkTriangleEQUILATERAL(){
- assertEquals(TriangleChecker.TriangleType.EQUILATERAL,TriangleChecker.checkTriangle(6,6, 6));
- }
-
- @Test
- void checkTriangleANegativ(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(-6,6, 6));
- }
- @Test
- void checkTriangleBNegativ(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(6,-6, 6));
- }
- @Test
- void checkTriangleCNegativ(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(6,6, -6));
- }
-
- @Test
- void checkTriangleAToLong(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(36,6, 6));
- }
- @Test
- void checkTriangleBToLong(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(6,46, 6));
- }
- @Test
- void checkTriangleCToLong(){
- assertEquals(TriangleChecker.TriangleType.NONE,TriangleChecker.checkTriangle(6,6, 56));
- }
- }
|