use of org.camunda.bpm.model.dmn.DmnModelInstance in project camunda-engine-dmn by camunda.
the class DmnTransformTest method shouldDetectLoopInParseDecisionWithSelfRequiredDecision.
@Test
public void shouldDetectLoopInParseDecisionWithSelfRequiredDecision() {
InputStream inputStream = IoUtil.fileAsStream(SELF_REQUIRED_DECISIONS_DMN);
DmnModelInstance modelInstance = Dmn.readModelFromStream(inputStream);
try {
decision = dmnEngine.parseDecision("buyProduct", modelInstance);
failBecauseExceptionWasNotThrown(DmnTransformException.class);
} catch (DmnTransformException e) {
Assertions.assertThat(e).hasMessageStartingWith("DMN-02004").hasMessageContaining("DMN-02015").hasMessageContaining("has a loop");
}
}
Aggregations