use of org.camunda.bpm.engine.test.cmmn.tasklistener.util.NotTaskListener in project camunda-bpm-platform by camunda.
the class TaskListenerTest method testDoesNotImplementTaskListenerInterfaceByDelegateExpression.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/tasklistener/TaskListenerTest.testDoesNotImplementTaskListenerInterfaceByDelegateExpression.cmmn" })
public void testDoesNotImplementTaskListenerInterfaceByDelegateExpression() {
try {
caseService.withCaseDefinitionByKey("case").setVariable("myTaskListener", new NotTaskListener()).create().getId();
fail("exception expected");
} catch (Exception e) {
// then
Throwable cause = e.getCause();
String message = cause.getMessage();
assertTextPresent("Delegate expression ${myTaskListener} did not resolve to an implementation of interface " + TaskListener.class.getName(), message);
}
}
Aggregations