added EquivalenceClassTest
This commit is contained in:
parent
3418b5446d
commit
3708c2c87c
37
src/test/java/de/hsel/sqs/EquivalenceClassTest.java
Normal file
37
src/test/java/de/hsel/sqs/EquivalenceClassTest.java
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package de.hsel.sqs;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Julian Hinxlage
|
||||||
|
* @version 0.1
|
||||||
|
* @since 0.1
|
||||||
|
**/
|
||||||
|
public class EquivalenceClassTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void noTriangle() {
|
||||||
|
TriangleChecker tc = new TriangleChecker();
|
||||||
|
assertEquals(TriangleType.NO_TRIANGLE, TriangleChecker.checkTriangle(-1, 1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void equilateralTriangle() {
|
||||||
|
TriangleChecker tc = new TriangleChecker();
|
||||||
|
assertEquals(TriangleType.EQUILATERAL_TRIANGLE, TriangleChecker.checkTriangle(2, 2, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void isocelessTriangle() {
|
||||||
|
TriangleChecker tc = new TriangleChecker();
|
||||||
|
assertEquals(TriangleType.ISOSCELESS_TRIANGLE, TriangleChecker.checkTriangle(2, 2, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void scaleneTriangle() {
|
||||||
|
TriangleChecker tc = new TriangleChecker();
|
||||||
|
assertEquals(TriangleType.SCALENE_TRIANGLE, TriangleChecker.checkTriangle(2, 3, 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user