mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
OnlyConclusionStepTest
This commit is contained in:
parent
36e763ce6d
commit
862fc87393
@ -0,0 +1,35 @@
|
|||||||
|
package edu.kit.typicalc.model.step;
|
||||||
|
|
||||||
|
import edu.kit.typicalc.model.Conclusion;
|
||||||
|
import edu.kit.typicalc.model.term.VarTerm;
|
||||||
|
import edu.kit.typicalc.model.type.NamedType;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
|
class OnlyConclusionStepTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getConstraintTest() {
|
||||||
|
EmptyStep step = new EmptyStep();
|
||||||
|
boolean thrown = false;
|
||||||
|
try {
|
||||||
|
step.getConstraint();
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
thrown = true;
|
||||||
|
}
|
||||||
|
assertTrue(thrown);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void acceptTest() {
|
||||||
|
TestStepVisitor testStepVisitor = new TestStepVisitor();
|
||||||
|
OnlyConclusionStep step = new OnlyConclusionStep(
|
||||||
|
new Conclusion(Collections.emptyMap(), new VarTerm(""), new NamedType("")));
|
||||||
|
step.accept(testStepVisitor);
|
||||||
|
assertEquals("onlyConclusion", testStepVisitor.visited);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user