use of org.camunda.bpm.model.dmn.util.DmnModelResource in project camunda-dmn-model by camunda.
the class ExpressionLanguageTest method shouldReadExpressionLanguage.
@Test
@DmnModelResource(resource = EXPRESSION_LANGUAGE_DMN)
public void shouldReadExpressionLanguage() {
Definitions definitions = modelInstance.getDefinitions();
assertThat(definitions.getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
DecisionTable decisionTable = modelInstance.getModelElementById("decisionTable");
Input input = decisionTable.getInputs().iterator().next();
assertThat(input.getInputExpression().getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
assertThat(input.getInputValues().getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
Output output = decisionTable.getOutputs().iterator().next();
assertThat(output.getOutputValues().getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
Rule rule = decisionTable.getRules().iterator().next();
InputEntry inputEntry = rule.getInputEntries().iterator().next();
assertThat(inputEntry.getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
OutputEntry outputEntry = rule.getOutputEntries().iterator().next();
assertThat(outputEntry.getExpressionLanguage()).isEqualTo(EXPRESSION_LANGUAGE);
}
Aggregations