use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractIntermediateEscalationEvent.
@Test
public void testExtractIntermediateEscalationEvent() {
IntermediateEscalationEvent intermediateEscalationEvent = new IntermediateEscalationEvent();
IntermediateEscalationEvent intermediateEscalationEvent2 = new IntermediateEscalationEvent();
when(firstView.getDefinition()).thenReturn(intermediateEscalationEvent);
when(lastView.getDefinition()).thenReturn(intermediateEscalationEvent2);
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.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockIntermediateEscalationEvent.
private IntermediateEscalationEvent mockIntermediateEscalationEvent(String name, String assignmentsInfoValue) {
IntermediateEscalationEvent result = mockCatchingEvent(name, IntermediateEscalationEvent.class);
AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
DataIOSet dataIOSet = mockIOSet(assignmentsInfo);
when(result.getDataIOSet()).thenReturn(dataIOSet);
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method escalationEvent.
@Test
public void escalationEvent() {
IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
IntermediateCatchEvent catchEvent = mockIntermediateCatchEvent(definition);
tested.escalationEvent(catchEvent, eventDefinition);
verifyCommonProperties(definition);
verify(propertyReader).isCancelActivity();
verify(propertyReader).getSlaDueDate();
verify(eventDefinition).getEscalationRef();
verify(definition).setExecutionSet(Mockito.<CancellingEscalationEventExecutionSet>any());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifyEscalationEventConvert.
private void verifyEscalationEventConvert() {
IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
IntermediateCatchEvent intermediateCatchEvent = mockIntermediateCatchEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convert(intermediateCatchEvent);
verify(tested).escalationEvent(intermediateCatchEvent, eventDefinition);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class EventCancelActivityViewHandlerTest method testHandleEscalationIsCancel.
@Test
@SuppressWarnings("unchecked")
public void testHandleEscalationIsCancel() {
final IntermediateEscalationEvent bean = new IntermediateEscalationEvent();
bean.getExecutionSet().getCancelActivity().setValue(true);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(1d));
verify(prim1).setStrokeAlpha(eq(0d));
}
Aggregations