use of org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity in project camunda-bpm-platform by camunda.
the class StageDiscretionaryItemHandlerTest method testActivityBehavior.
@Test
public void testActivityBehavior() {
// given: a discretionaryItem
// when
CmmnActivity activity = handler.handleElement(discretionaryItem, context);
// then
CmmnActivityBehavior behavior = activity.getActivityBehavior();
assertTrue(behavior instanceof StageActivityBehavior);
}
use of org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity in project camunda-bpm-platform by camunda.
the class StageDiscretionaryItemHandlerTest method testStageDescription.
@Test
public void testStageDescription() {
// given
String description = "This is a stage";
stage.setDescription(description);
// when
CmmnActivity activity = handler.handleElement(discretionaryItem, context);
// then
assertEquals(description, activity.getProperty(PROPERTY_ACTIVITY_DESCRIPTION));
}
use of org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity in project camunda-bpm-platform by camunda.
the class StageDiscretionaryItemHandlerTest method testStageActivityType.
@Test
public void testStageActivityType() {
// given
// when
CmmnActivity activity = handler.handleElement(discretionaryItem, context);
// then
String activityType = (String) activity.getProperty(PROPERTY_ACTIVITY_TYPE);
assertEquals("stage", activityType);
}
use of org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity in project camunda-bpm-platform by camunda.
the class StagePlanItemHandlerTest method testManualActivationRule.
@Test
public void testManualActivationRule() {
// given
ItemControl itemControl = createElement(planItem, "ItemControl_1", ItemControl.class);
ManualActivationRule manualActivationRule = createElement(itemControl, "ManualActivationRule_1", ManualActivationRule.class);
ConditionExpression expression = createElement(manualActivationRule, "Expression_1", ConditionExpression.class);
expression.setText("${true}");
Cmmn.validateModel(modelInstance);
// when
CmmnActivity newActivity = handler.handleElement(planItem, context);
// then
Object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE);
assertNotNull(rule);
assertTrue(rule instanceof CaseControlRule);
}
use of org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity in project camunda-bpm-platform by camunda.
the class StagePlanItemHandlerTest method testWithoutParent.
@Test
public void testWithoutParent() {
// given: a planItem
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
assertNull(activity.getParent());
}
Aggregations