use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionByKey.
@Deployment(resources = DMN_DECISION_LITERAL_EXPRESSION)
@Test
public void evaluateDecisionByKey() {
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionTableByKeyWithNonExistingVersion.
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKeyWithNonExistingVersion() {
DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().singleResult();
thrown.expect(NotFoundException.class);
thrown.expectMessage("no decision definition deployed with key = 'decision' and version = '42'");
decisionService.evaluateDecisionTableByKeyAndVersion(decisionDefinition.getKey(), 42, null);
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionTableByKey.
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKey() {
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY, createVariables());
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionByKeyAndNullVersion.
@Deployment(resources = DMN_DECISION_LITERAL_EXPRESSION)
@Test
public void evaluateDecisionByKeyAndNullVersion() {
testRule.deploy(DMN_DECISION_LITERAL_EXPRESSION_V2);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).version(null).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_SECOND_VERSION);
}
use of org.camunda.bpm.engine.test.Deployment in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionWithRequiredDecisions.
@Deployment(resources = DRD_DISH_DECISION_TABLE)
@Test
public void evaluateDecisionWithRequiredDecisions() {
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey("dish-decision", Variables.createVariables().putValue("temperature", 32).putValue("dayType", "Weekend"));
assertThatDecisionHasResult(decisionResult, "Light salad");
}
Aggregations