|
|
@@ -0,0 +1,43 @@ |
|
|
|
package Praktikum03; |
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
class TriangleCheckerTest { |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkTriangle() { |
|
|
|
int a = 3; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkNormalTriangle() { |
|
|
|
|
|
|
|
float a = 3.0f; |
|
|
|
float b = 4.0f; |
|
|
|
float c = 2.0f; |
|
|
|
|
|
|
|
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,b,c); |
|
|
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.NORMAL, type); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkEquilateralTriangle() { |
|
|
|
|
|
|
|
float a = 3.0f; |
|
|
|
|
|
|
|
|
|
|
|
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,a,a); |
|
|
|
|
|
|
|
assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type); |
|
|
|
|
|
|
|
} |
|
|
|
} |