use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractIntermediateEscalationEventThrowing.
@Test
public void testExtractIntermediateEscalationEventThrowing() {
IntermediateEscalationEventThrowing intermediateEscalationEventThrowing = new IntermediateEscalationEventThrowing();
IntermediateEscalationEventThrowing intermediateEscalationEventThrowing2 = new IntermediateEscalationEventThrowing();
when(firstView.getDefinition()).thenReturn(intermediateEscalationEventThrowing);
when(lastView.getDefinition()).thenReturn(intermediateEscalationEventThrowing);
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.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateEscalationEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateEscalationEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_ESCALATION_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("IntermediateEscalationEventThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> throwingEventNode = diagram.getGraph().getNode("_8516D854-F67F-4697-9837-40A32033AE25");
assertNotNull(throwingEventNode);
IntermediateEscalationEventThrowing throwingEscalationEvent = (IntermediateEscalationEventThrowing) throwingEventNode.getContent().getDefinition();
assertNotNull(throwingEscalationEvent.getGeneral());
assertEquals("ThrowingEscalationEventName", throwingEscalationEvent.getGeneral().getName().getValue());
assertEquals("ThrowingEscalationEventDocumentation", throwingEscalationEvent.getGeneral().getDocumentation().getValue());
assertNotNull(throwingEscalationEvent.getExecutionSet());
assertEquals("EscalationCode", throwingEscalationEvent.getExecutionSet().getEscalationRef().getValue());
DataIOSet dataIOSet = throwingEscalationEvent.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("escalationOutput:String||||[din]processVar1->escalationOutput", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockIntermediateEscalationEventThrowing.
private IntermediateEscalationEventThrowing mockIntermediateEscalationEventThrowing(String name, String assignmentsInfoValue) {
IntermediateEscalationEventThrowing result = mockThrowingEvent(name, IntermediateEscalationEventThrowing.class);
AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
DataIOSet dataIOSet = mockIOSet(assignmentsInfo);
when(result.getDataIOSet()).thenReturn(dataIOSet);
return result;
}
Aggregations