Search in sources :

Example 6 with DmnDecisionResultEntries

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

the class DmnDecisionTaskResultListenerTest method testSingleEntry.

@Deployment(resources = { TEST_CASE, TEST_DECISION })
public void testSingleEntry() {
    startTestCase("single entry");
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals("foo", firstOutput.getFirstEntry());
    assertEquals(Variables.stringValue("foo"), firstOutput.getFirstEntryTyped());
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 7 with DmnDecisionResultEntries

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

the class DmnDecisionTaskResultListenerTest method testMultipleEntriesList.

@Deployment(resources = { TEST_CASE, TEST_DECISION })
public void testMultipleEntriesList() {
    startTestCase("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"));
    }
}
Also used : DmnDecisionResultEntries(org.camunda.bpm.dmn.engine.DmnDecisionResultEntries) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 8 with DmnDecisionResultEntries

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

the class DmnDecisionTaskResultListenerTest method testCollectSumHitPolicySingleEntryList.

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

Example 9 with DmnDecisionResultEntries

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

the class DmnDecisionResultListenerTest method testCollectSumHitPolicySingleEntryList.

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

Example 10 with DmnDecisionResultEntries

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

the class DmnDecisionResultListenerTest method testSingleEntry.

@Deployment(resources = { TEST_PROCESS, TEST_DECISION })
public void testSingleEntry() {
    startTestProcess("single entry");
    DmnDecisionResultEntries firstOutput = results.get(0);
    assertEquals("foo", firstOutput.getFirstEntry());
    assertEquals(Variables.stringValue("foo"), firstOutput.getFirstEntryTyped());
}
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