mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-10 03:10:44 +00:00
EmptyStep test
This commit is contained in:
parent
f46997d359
commit
612edac87b
40
src/test/java/edu/kit/typicalc/model/step/EmptyStepTest.java
Normal file
40
src/test/java/edu/kit/typicalc/model/step/EmptyStepTest.java
Normal file
@ -0,0 +1,40 @@
|
||||
package edu.kit.typicalc.model.step;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class EmptyStepTest {
|
||||
|
||||
@Test
|
||||
void getConclusionTest() {
|
||||
EmptyStep step = new EmptyStep();
|
||||
boolean thrown = false;
|
||||
try {
|
||||
step.getConclusion();
|
||||
} catch (IllegalStateException e) {
|
||||
thrown = true;
|
||||
}
|
||||
assertTrue(thrown);
|
||||
}
|
||||
|
||||
@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();
|
||||
EmptyStep step = new EmptyStep();
|
||||
step.accept(testStepVisitor);
|
||||
assertEquals("empty", testStepVisitor.visited);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user