use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef 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);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method setUp.
@Before
public void setUp() {
Event throwEvent = bpmn2.createIntermediateThrowEvent();
throwEvent.setId("throwEventID");
throwEventPropertyWriter = spy(new ThrowEventPropertyWriter((ThrowEvent) throwEvent, new FlatVariableScope(), new HashSet<>()));
propertyWriterFactory = spy(PropertyWriterFactory.class);
when(propertyWriterFactory.of(any(ThrowEvent.class))).thenReturn(throwEventPropertyWriter);
generalSet = new BPMNGeneralSet(NAME, DOCUMENTATION);
assignmentsInfo = new AssignmentsInfo(ASSIGNMENTS_INFO);
dataIOSet = new DataIOSet(assignmentsInfo);
advancedData = new AdvancedData();
signalRef = mock(SignalRef.class);
signalScope = mock(SignalScope.class);
linkRef = mock(LinkRef.class);
messageRef = mock(MessageRef.class);
escalationRef = mock(EscalationRef.class);
tested = spy(new IntermediateThrowEventConverter(propertyWriterFactory));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testIntermediateLinkThrowingEventEquals.
@Test
public void testIntermediateLinkThrowingEventEquals() {
IntermediateLinkEventThrowing linkEvent = new IntermediateLinkEventThrowing();
IntermediateLinkEventThrowing linkEvent2 = new IntermediateLinkEventThrowing();
assertNotEquals(linkEvent, null);
assertNotEquals(linkEvent, "");
assertEquals(linkEvent, linkEvent);
assertEquals(linkEvent, linkEvent2);
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("black"));
linkEvent.setBackgroundSet(backgroundSet);
assertNotEquals(linkEvent, linkEvent2);
linkEvent2.setBackgroundSet(backgroundSet);
assertEquals(linkEvent, linkEvent2);
linkEvent.setBackgroundSet(backgroundSet);
linkEvent.setExecutionSet(new LinkEventExecutionSet(new LinkRef("value")));
assertNotEquals(linkEvent, linkEvent2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testLinkRef.
@Test
public void testLinkRef() {
LinkRef link = new LinkRef("link");
assertNotEquals(link, null);
assertNotEquals(link, "");
assertEquals(link, link);
LinkRef link2 = new LinkRef("link");
assertEquals(link, link2);
link2.setValue("link2");
assertNotEquals(link, link2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method linkEvent.
protected BpmnNode linkEvent(IntermediateThrowEvent event) {
Node<View<IntermediateLinkEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateLinkEventThrowing.class);
IntermediateLinkEventThrowing definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
node.getContent().setBounds(p.getBounds());
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new LinkEventExecutionSet(new LinkRef(p.getLinkRef())));
return BpmnNode.of(node, p);
}
Aggregations