use of org.camunda.bpm.dmn.engine.test.DecisionResource in project camunda-engine-dmn by camunda.
the class HitPolicyTest method testCollectHitPolicySingleOutputMultipleMatchingRules.
@Test
@DecisionResource(resource = COLLECT_SINGLE)
public void testCollectHitPolicySingleOutputMultipleMatchingRules() {
DmnDecisionTableResult results = evaluateDecisionTable(true, true, false, "a", "b", "c");
assertThat(results).hasSize(2);
assertThat(collectSingleOutputEntries(results)).containsOnlyOnce("a", "b");
results = evaluateDecisionTable(true, false, true, "a", "b", "c");
assertThat(results).hasSize(2);
assertThat(collectSingleOutputEntries(results)).containsOnlyOnce("a", "c");
results = evaluateDecisionTable(false, true, true, "a", "b", "c");
assertThat(results).hasSize(2);
assertThat(collectSingleOutputEntries(results)).containsOnlyOnce("b", "c");
results = evaluateDecisionTable(true, true, true, "a", "b", "c");
assertThat(results).hasSize(3);
assertThat(collectSingleOutputEntries(results)).containsOnlyOnce("a", "b", "c");
}
Aggregations