use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateCompensationEventThrowing emptySubprocessEvent = getThrowingIntermediateNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertCompensationEventExecutionSet(emptySubprocessEvent.getExecutionSet(), DEFAULT_REFERENCE_ACTIVITY);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventWithEdgesFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesFilledProperties() {
final String EVENT_NAME = "Compensation event04 name\n ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Compensation event04 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String ACTIVITY_REFERENCE = "_4305E23D-496B-42AA-AEE0-2840B4E75F15";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateCompensationEventThrowing filledSubprocessEvent = getThrowingIntermediateNodeById(diagram, FILLED_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertCompensationEventExecutionSet(filledSubprocessEvent.getExecutionSet(), ACTIVITY_REFERENCE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateCompensationEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Compensation event01 name\n ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Compensation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String ACTIVITY_REFERENCE = "_1FDF93CC-5677-48C2-9760-B7B98FA08DD6";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateCompensationEventThrowing filledTopEvent = getThrowingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertCompensationEventExecutionSet(filledTopEvent.getExecutionSet(), ACTIVITY_REFERENCE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties() {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateCompensationEventThrowing emptySubprocessEvent = getThrowingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertCompensationEventExecutionSet(emptySubprocessEvent.getExecutionSet(), DEFAULT_REFERENCE_ACTIVITY);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method verifyCompensationEventConvert.
private void verifyCompensationEventConvert() {
IntermediateCompensationEventThrowing definition = mock(IntermediateCompensationEventThrowing.class);
CompensateEventDefinition eventDefinition = mock(CompensateEventDefinition.class);
IntermediateThrowEvent intermediateThrowEvent = mockIntermediateThrowEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convert(intermediateThrowEvent);
verify(tested).compensationEvent(intermediateThrowEvent, eventDefinition);
}
Aggregations