use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractIntermediateLinkEventCatching.
@Test
public void testExtractIntermediateLinkEventCatching() {
IntermediateLinkEventCatching intermediateLinkEventCatching = new IntermediateLinkEventCatching();
IntermediateLinkEventCatching intermediateLinkEventCatching2 = new IntermediateLinkEventCatching();
when(firstView.getDefinition()).thenReturn(intermediateLinkEventCatching);
when(lastView.getDefinition()).thenReturn(intermediateLinkEventCatching2);
dataTypeCache.extractFromItem(firstView);
dataTypeCache.extractFromItem(lastView);
assertTrue(dataTypeCache.allDataTypes.contains("MyType"));
assertTrue(dataTypeCache.allDataTypes.contains("com.myspace.Person"));
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method linkEvent.
@Test
public void linkEvent() {
IntermediateLinkEventCatching definition = mock(IntermediateLinkEventCatching.class);
LinkEventDefinition eventDefinition = mock(LinkEventDefinition.class);
CatchEvent catchEvent = mockIntermediateCatchEvent(definition);
tested.linkEvent(catchEvent);
verifyCommonProperties(definition);
verify(propertyReader).getLinkRef();
verify(definition).setExecutionSet(Mockito.<LinkEventExecutionSet>any());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method linkEvent.
protected Result<BpmnNode> linkEvent(CatchEvent event) {
String nodeId = event.getId();
Node<View<IntermediateLinkEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateLinkEventCatching.class);
IntermediateLinkEventCatching definition = node.getContent().getDefinition();
CatchEventPropertyReader p = propertyReaderFactory.of(event);
node.getContent().setBounds(p.getBounds());
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new LinkEventExecutionSet(new LinkRef(p.getLinkRef())));
return Result.success(BpmnNode.of(node, p));
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method createIntermediateLinkEventCatchingNode.
private Node createIntermediateLinkEventCatchingNode() {
LinkEventExecutionSet executionSet = new LinkEventExecutionSet(linkRef);
IntermediateLinkEventCatching eventCatching = new IntermediateLinkEventCatching(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventCatching);
return node;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching in project kie-wb-common by kiegroup.
the class ProcessLinkRefProviderTest method mockIntermediateLinkEventCatchingNode.
private Node mockIntermediateLinkEventCatchingNode(String linkRefValue) {
IntermediateLinkEventCatching event = new IntermediateLinkEventCatching();
event.setExecutionSet(new LinkEventExecutionSet(new LinkRef(linkRefValue)));
return mockNode(event);
}
Aggregations