use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class TaskDecoratorTest method testDecorateAssignee.
public void testDecorateAssignee() {
// given
String aAssignee = "john";
Expression assigneeExpression = expressionManager.createExpression(aAssignee);
taskDefinition.setAssigneeExpression(assigneeExpression);
// when
decorate(task, taskDecorator);
// then
assertEquals(aAssignee, task.getAssignee());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class TaskDecoratorTest method testDecoratePriorityFromVariable.
public void testDecoratePriorityFromVariable() {
// given
int aPriority = 10;
taskService.setVariable(task.getId(), "priority", aPriority);
Expression priorityExpression = expressionManager.createExpression("${priority}");
taskDefinition.setPriorityExpression(priorityExpression);
// when
decorate(task, taskDecorator);
// then
assertEquals(aPriority, task.getPriority());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class TaskDecoratorTest method testDecorateName.
public void testDecorateName() {
// given
String aTaskName = "A Task Name";
Expression nameExpression = expressionManager.createExpression(aTaskName);
taskDefinition.setNameExpression(nameExpression);
// when
decorate(task, taskDecorator);
// then
assertEquals(aTaskName, task.getName());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class TaskDecoratorTest method testDecorateDueDate.
public void testDecorateDueDate() {
// given
String aDueDate = "2014-06-01";
Date dueDate = DateTimeUtil.parseDate(aDueDate);
Expression dueDateExpression = expressionManager.createExpression(aDueDate);
taskDefinition.setDueDateExpression(dueDateExpression);
// when
decorate(task, taskDecorator);
// then
assertEquals(dueDate, task.getDueDate());
}
use of org.camunda.bpm.engine.delegate.Expression in project camunda-bpm-platform by camunda.
the class TaskDecoratorTest method testDecorateDescriptionFromVariable.
public void testDecorateDescriptionFromVariable() {
// given
String aDescription = "This is a Task";
taskService.setVariable(task.getId(), "description", aDescription);
Expression descriptionExpression = expressionManager.createExpression("${description}");
taskDefinition.setDescriptionExpression(descriptionExpression);
// when
decorate(task, taskDecorator);
// then
assertEquals(aDescription, task.getDescription());
}
Aggregations