use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifySignalEventConvert.
private void verifySignalEventConvert() {
IntermediateSignalEventCatching definition = mock(IntermediateSignalEventCatching.class);
SignalEventDefinition eventDefinition = mock(SignalEventDefinition.class);
IntermediateCatchEvent intermediateCatchEvent = mockIntermediateCatchEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convert(intermediateCatchEvent);
verify(tested).signalEvent(intermediateCatchEvent);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractIntermediateSignalEventCatching.
@Test
public void testExtractIntermediateSignalEventCatching() {
IntermediateSignalEventCatching intermediateSignalEventCatching = new IntermediateSignalEventCatching();
IntermediateSignalEventCatching intermediateSignalEventCatching2 = new IntermediateSignalEventCatching();
when(firstView.getDefinition()).thenReturn(intermediateSignalEventCatching);
when(lastView.getDefinition()).thenReturn(intermediateSignalEventCatching2);
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.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateSignalEventCatching.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateSignalEventCatching() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_SIGNAL_EVENTCATCHING);
assertDiagram(diagram, 2);
assertEquals("intermediateSignalCatching", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("_2C9B14A3-F663-476D-9FDF-31590D3A9CC5");
IntermediateSignalEventCatching intermediateSignalEventCatching = (IntermediateSignalEventCatching) intermediateEventNode.getContent().getDefinition();
assertNotNull(intermediateSignalEventCatching.getGeneral());
assertEquals("MySignalCatchingEvent", intermediateSignalEventCatching.getGeneral().getName().getValue());
assertEquals("MySignalCatchingEventDocumentation", intermediateSignalEventCatching.getGeneral().getDocumentation().getValue());
assertNotNull(intermediateSignalEventCatching.getExecutionSet());
assertEquals(true, intermediateSignalEventCatching.getExecutionSet().getCancelActivity().getValue());
assertEquals("MySignal", intermediateSignalEventCatching.getExecutionSet().getSignalRef().getValue());
assertEquals("12/25/1983", intermediateSignalEventCatching.getExecutionSet().getSlaDueDate().getValue());
DataIOSet dataIOSet = intermediateSignalEventCatching.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("||output1_:String||[dout]output1_->var1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.
the class EventCancelActivityViewHandlerTest method testHandleSignalIsNotCancel.
@Test
@SuppressWarnings("unchecked")
public void testHandleSignalIsNotCancel() {
final IntermediateSignalEventCatching bean = new IntermediateSignalEventCatching();
bean.getExecutionSet().getCancelActivity().setValue(false);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(0d));
verify(prim1).setStrokeAlpha(eq(1d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.
the class EventCancelActivityViewHandlerTest method testHandleSignalIsCancel.
@Test
@SuppressWarnings("unchecked")
public void testHandleSignalIsCancel() {
final IntermediateSignalEventCatching bean = new IntermediateSignalEventCatching();
bean.getExecutionSet().getCancelActivity().setValue(true);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(1d));
verify(prim1).setStrokeAlpha(eq(0d));
}
Aggregations