use of org.camunda.bpm.dmn.engine.DmnDecisionRequirementsGraph in project camunda-engine-dmn by camunda.
the class ParseDecisionTest method shouldParseDrgFromInputStream.
@Test
public void shouldParseDrgFromInputStream() {
InputStream inputStream = IoUtil.fileAsStream(NO_INPUT_DMN);
DmnDecisionRequirementsGraph drg = dmnEngine.parseDecisionRequirementsGraph(inputStream);
assertDecisionRequirementsGraph(drg, "definitions");
}
use of org.camunda.bpm.dmn.engine.DmnDecisionRequirementsGraph in project camunda-engine-dmn by camunda.
the class DmnDecisionEvaluationTest method shouldEvaluateDecisionWithRuleOrderHitPolicyReturningAList.
@Test
public void shouldEvaluateDecisionWithRuleOrderHitPolicyReturningAList() {
DmnDecisionRequirementsGraph graph = dmnEngine.parseDecisionRequirementsGraph(IoUtil.fileAsStream(DRG_RULE_ORDER_DMN));
initVariables();
variables.putValue("dayType", "WeekDay");
DmnDecisionResult result = dmnEngine.evaluateDecision(graph.getDecision("dish-decision"), variables);
assertThat(result.getSingleEntry()).isNotNull().isEqualTo("Steak");
}
Aggregations