Search in sources :

Example 11 with DmnDecisionResultEntries

use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.

the class DmnDecisionTaskResultListenerTest method testSingleEntryList.

@Deployment(resources = { TEST_CASE, TEST_DECISION })
public void testSingleEntryList() {
    startTestCase("single entry list");
    assertEquals(2, results.size());
    for (DmnDecisionResultEntries output : results) {
        assertEquals("foo", output.getFirstEntry());
        assertEquals(Variables.stringValue("foo"), output.getFirstEntryTyped());
    }
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 12 with DmnDecisionResultEntries

use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.

the class DmnDecisionTaskResultListenerTest method testCollectSumHitPolicySingleEntry.

@Deployment(resources = { TEST_CASE, TEST_DECISION_COLLECT_SUM })
public void testCollectSumHitPolicySingleEntry() {
    startTestCase("single entry");
    assertEquals(1, results.size());
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals(12, firstOutput.getFirstEntry());
    assertEquals(Variables.integerValue(12), firstOutput.getFirstEntryTyped());
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 13 with DmnDecisionResultEntries

use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.

the class DmnDecisionTaskResultListenerTest method testCollectCountHitPolicyNoOutput.

@Deployment(resources = { TEST_CASE, TEST_DECISION_COLLECT_COUNT })
public void testCollectCountHitPolicyNoOutput() {
    startTestCase("no output");
    assertEquals(1, results.size());
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals(0, firstOutput.getFirstEntry());
    assertEquals(Variables.integerValue(0), firstOutput.getFirstEntryTyped());
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 14 with DmnDecisionResultEntries

use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.

the class DmnDecisionTaskResultListenerTest method testMultipleEntries.

@Deployment(resources = { TEST_CASE, TEST_DECISION })
public void testMultipleEntries() {
    startTestCase("multiple entries");
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals("foo", firstOutput.get("result1"));
    assertEquals("bar", firstOutput.get("result2"));
    assertEquals(Variables.stringValue("foo"), firstOutput.getEntryTyped("result1"));
    assertEquals(Variables.stringValue("bar"), firstOutput.getEntryTyped("result2"));
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 15 with DmnDecisionResultEntries

use of org.camunda.bpm.dmn.engine.DmnDecisionResultEntries in project camunda-bpm-platform by camunda.

the class DmnDecisionResultListenerTest method testMultipleEntries.

@Deployment(resources = { TEST_PROCESS, TEST_DECISION })
public void testMultipleEntries() {
    startTestProcess("multiple entries");
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals("foo", firstOutput.get("result1"));
    assertEquals("bar", firstOutput.get("result2"));
    assertEquals(Variables.stringValue("foo"), firstOutput.getEntryTyped("result1"));
    assertEquals(Variables.stringValue("bar"), firstOutput.getEntryTyped("result2"));
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Aggregations

DmnDecisionResultEntries (org.camunda.bpm.dmn.engine.DmnDecisionResultEntries)27 Deployment (org.camunda.bpm.engine.test.Deployment)18 ArrayList (java.util.ArrayList)5 DmnDecisionResult (org.camunda.bpm.dmn.engine.DmnDecisionResult)4 DecisionResource (org.camunda.bpm.dmn.engine.test.DecisionResource)4 DmnEngineTest (org.camunda.bpm.dmn.engine.test.DmnEngineTest)4 Test (org.junit.Test)4 Map (java.util.Map)2 TypedValue (org.camunda.bpm.engine.variable.value.TypedValue)2 DmnDecisionRuleResult (org.camunda.bpm.dmn.engine.DmnDecisionRuleResult)1 DmnDecisionTableEvaluationEvent (org.camunda.bpm.dmn.engine.delegate.DmnDecisionTableEvaluationEvent)1 DmnEvaluatedDecisionRule (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedDecisionRule)1 DmnEvaluatedOutput (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedOutput)1 DmnDecisionResultEntriesImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionResultEntriesImpl)1 DmnDecisionResultException (org.camunda.bpm.dmn.engine.impl.DmnDecisionResultException)1 DmnDecisionResultImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionResultImpl)1 VariableValueDto (org.camunda.bpm.engine.rest.dto.VariableValueDto)1 VariableMap (org.camunda.bpm.engine.variable.VariableMap)1