use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.
the class DmnDecisionResultListenerTest method testCollectSumHitPolicySingleEntry.
@Deployment(resources = { TEST_PROCESS, TEST_DECISION_COLLECT_SUM })
public void testCollectSumHitPolicySingleEntry() {
startTestProcess("single entry");
assertEquals(1, results.size());
DmnDecisionResultEntries firstOutput = results.get(0);
assertEquals(12, firstOutput.getFirstEntry());
assertEquals(Variables.integerValue(12), firstOutput.getFirstEntryTyped());
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.
the class DmnDecisionResultListenerTest method testCollectCountHitPolicyNoOutput.
@Deployment(resources = { TEST_PROCESS, TEST_DECISION_COLLECT_COUNT })
public void testCollectCountHitPolicyNoOutput() {
startTestProcess("no output");
assertEquals(1, results.size());
DmnDecisionResultEntries firstOutput = results.get(0);
assertEquals(0, firstOutput.getFirstEntry());
assertEquals(Variables.integerValue(0), firstOutput.getFirstEntryTyped());
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.
the class DmnDecisionResultListenerTest method testEmptyOutput.
@Deployment(resources = { TEST_PROCESS, TEST_DECISION })
public void testEmptyOutput() {
startTestProcess("empty output");
assertFalse("The decision result 'ruleResult' should not be empty", results.isEmpty());
DmnDecisionResultEntries decisionOutput = results.get(0);
assertNull(decisionOutput.getFirstEntry());
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.
the class DmnDecisionResultListenerTest method testSingleEntryList.
@Deployment(resources = { TEST_PROCESS, TEST_DECISION })
public void testSingleEntryList() {
startTestProcess("single entry list");
assertEquals(2, results.size());
for (DmnDecisionResultEntries output : results) {
assertEquals("foo", output.getFirstEntry());
assertEquals(Variables.stringValue("foo"), output.getFirstEntryTyped());
}
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.
the class DmnDecisionResultListenerTest method testMultipleEntriesList.
@Deployment(resources = { TEST_PROCESS, TEST_DECISION })
public void testMultipleEntriesList() {
startTestProcess("multiple entries list");
assertEquals(2, results.size());
for (DmnDecisionResultEntries output : results) {
assertEquals(2, output.size());
assertEquals("foo", output.get("result1"));
assertEquals("bar", output.get("result2"));
assertEquals(Variables.stringValue("foo"), output.getEntryTyped("result1"));
assertEquals(Variables.stringValue("bar"), output.getEntryTyped("result2"));
}
}
Aggregations