use of org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent in project kie-wb-common by kiegroup.
the class StartEventFilterProviderFactoryTest method testFilterProviderHideIsInterruptingField.
@Test
public void testFilterProviderHideIsInterruptingField() {
BaseStartEvent[] test1Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartSignalEvent(), new StartTimerEvent(), new StartConditionalEvent(), new StartErrorEvent(), new StartEscalationEvent(), new StartMessageEvent() };
when(parentView.getDefinition()).thenReturn(otherNode);
Stream.of(test1Classes).forEach(catchingIntermediateEvent -> testStartEventFilterProviderHideIsInterruptingField(catchingIntermediateEvent));
BaseStartEvent[] test2Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartErrorEvent() };
when(parentView.getDefinition()).thenReturn(eventSubprocess);
Stream.of(test2Classes).forEach(clazz -> testStartEventFilterProviderHideIsInterruptingField(clazz));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent in project kie-wb-common by kiegroup.
the class StartCompensationEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Start compensation event01 name\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Start compensation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartCompensationEvent filledTopLevelEvent = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID);
assertGeneralSet(filledTopLevelEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertNotNull(filledTopLevelEvent.getExecutionSet());
assertStartEventSlaDueDate(filledTopLevelEvent.getExecutionSet(), SLA_DUE_DATE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent in project kie-wb-common by kiegroup.
the class StartCompensationEventTest method testUnmarshallTopLevelEmptyEventProperties.
@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartCompensationEvent emptyTopLevelEvent = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID);
assertGeneralSet(emptyTopLevelEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertNotNull(emptyTopLevelEvent.getExecutionSet());
assertStartEventSlaDueDate(emptyTopLevelEvent.getExecutionSet(), EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent in project kie-wb-common by kiegroup.
the class StartCompensationEventTest method testUnmarshallSubprocessLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Start compensation event02 name\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Start compensation event02 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartCompensationEvent filledSubprocessLevelEvent = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID);
assertGeneralSet(filledSubprocessLevelEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertNotNull(filledSubprocessLevelEvent.getExecutionSet());
assertStartEventSlaDueDate(filledSubprocessLevelEvent.getExecutionSet(), SLA_DUE_DATE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent in project kie-wb-common by kiegroup.
the class EventSubProcessPostConverterTest method testProcessWhenIsForCompensation.
@Test
@SuppressWarnings("unchecked")
public void testProcessWhenIsForCompensation() {
outEdges.add(mockEdge(mock(Node.class), newNode(new StartCompensationEvent())));
converter.process(processWriter, nodeWriter, eventSubprocessNode);
verify(subProcess).setIsForCompensation(true);
}
Aggregations