2
0

added EquivalenceClassTest

This commit is contained in:
Julian Hinxlage 2020-04-23 14:44:35 +02:00
parent 3418b5446d
commit 3708c2c87c

View 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));
}
}