public EscalationEventExecutionSet() { this(new EscalationRef()); }
@Test public void testEscalationEventExecutionSetEqualsAndHashCode() { String ESCALATION_REF = "ESCALATION_REF"; String ESCALATION_REF_1 = "ESCALATION_REF_1"; TestCaseBuilder.newTestCase() .addTrueCase(new EscalationEventExecutionSet(), new EscalationEventExecutionSet()) .addTrueCase(new EscalationEventExecutionSet(new EscalationRef()), new EscalationEventExecutionSet(new EscalationRef())) .addTrueCase(new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))) .addFalseCase(new EscalationEventExecutionSet(), null) .addFalseCase(new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF_1))) .test(); }
private void assertEscalationEventExecutionSet(EscalationEventExecutionSet executionSet, String eventReference) { assertNotNull(executionSet); assertNotNull(executionSet.getEscalationRef()); assertEquals(eventReference, executionSet.getEscalationRef().getValue()); } }
@Override public Function<Node, Pair<Object, String>> getMapper() { return node -> { EscalationRef escalationRef = null; if (startEscalationEventsFilter.test(node)) { escalationRef = ((StartEscalationEvent) ((View) node.getContent()).getDefinition()).getExecutionSet().getEscalationRef(); } else if (intermediateCatchingEscalationEventsFilter.test(node)) { escalationRef = ((IntermediateEscalationEvent) ((View) node.getContent()).getDefinition()).getExecutionSet().getEscalationRef(); } else if (intermediateThrowingEscalationEventsFilter.test(node)) { escalationRef = ((IntermediateEscalationEventThrowing) ((View) node.getContent()).getDefinition()).getExecutionSet().getEscalationRef(); } else if (endEscalationEventsFilter.test(node)) { escalationRef = ((EndEscalationEvent) ((View) node.getContent()).getDefinition()).getExecutionSet().getEscalationRef(); } if (escalationRef != null && escalationRef.getValue() != null && !escalationRef.getValue().isEmpty()) { return new Pair<>(escalationRef.getValue(), escalationRef.getValue(), Pair.PairEqualsMode.K1); } else { return null; } }; } }
private void assertEscalationEventExecutionSet(CancellingEscalationEventExecutionSet executionSet, String escalationRef, boolean isCancelling) { assertNotNull(executionSet); assertNotNull(executionSet.getEscalationRef()); assertNotNull(executionSet.getCancelActivity()); assertEquals(escalationRef, executionSet.getEscalationRef().getValue()); assertEquals(isCancelling, executionSet.getCancelActivity().getValue()); } }
private void assertEscalationEventExecutionSet(InterruptingEscalationEventExecutionSet executionSet, String escalationRef, boolean isInterrupting) { assertNotNull(executionSet); assertNotNull(executionSet.getEscalationRef()); assertNotNull(executionSet.getIsInterrupting()); assertEquals(escalationRef, executionSet.getEscalationRef().getValue()); assertEquals(isInterrupting, executionSet.getIsInterrupting().getValue()); } }
@Test public void testInterruptingEscalationEventExecutionSetEqualsAndHashCode() { String ESCALATION_REF = "ESCALATION_REF"; String ESCALATION_REF_1 = "ESCALATION_REF_1"; TestCaseBuilder.newTestCase() .addTrueCase(new InterruptingEscalationEventExecutionSet(), new InterruptingEscalationEventExecutionSet()) .addTrueCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef()), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef())) .addTrueCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef(ESCALATION_REF))) .addFalseCase(new InterruptingEscalationEventExecutionSet(), null) .addFalseCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(true), new EscalationRef(ESCALATION_REF))) .addFalseCase(new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef(ESCALATION_REF)), new InterruptingEscalationEventExecutionSet(new IsInterrupting(false), new EscalationRef(ESCALATION_REF_1))) .test(); }
@Test public void testCancellingEscalationEventExecutionSetEqualsAndHashCode() { String ESCALATION_REF = "ESCALATION_REF"; String ESCALATION_REF_1 = "ESCALATION_REF_1"; TestCaseBuilder.newTestCase() .addTrueCase(new CancellingEscalationEventExecutionSet(), new CancellingEscalationEventExecutionSet()) .addTrueCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef()), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef())) .addTrueCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef(ESCALATION_REF)), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef(ESCALATION_REF))) .addFalseCase(new CancellingEscalationEventExecutionSet(), null) .addFalseCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef(ESCALATION_REF)), new CancellingEscalationEventExecutionSet(new CancelActivity(true), new EscalationRef(ESCALATION_REF))) .addFalseCase(new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef(ESCALATION_REF)), new CancellingEscalationEventExecutionSet(new CancelActivity(false), new EscalationRef(ESCALATION_REF_1))) .test(); }
@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)); }
@Test @SuppressWarnings("unchecked") public void testHandleEscalationIsNotInterrupting() { final StartEscalationEvent bean = new StartEscalationEvent(); bean.getExecutionSet().getIsInterrupting().setValue(false); tested.handle(bean, view); verify(prim1).setFillAlpha(eq(0d)); verify(prim1).setStrokeAlpha(eq(1d)); }
public IntermediateEscalationEventThrowing() { this(new BPMNGeneralSet(""), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new EscalationEventExecutionSet()); }
public IntermediateEscalationEvent() { this(new BPMNGeneralSet(""), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new CancellingEscalationEventExecutionSet(), new DataIOSet()); }
public StartEscalationEvent() { this(new BPMNGeneralSet(""), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new SimulationAttributeSet(), new InterruptingEscalationEventExecutionSet(), new DataIOSet()); }
private void assertEscalationEventExecutionSet(CancellingEscalationEventExecutionSet executionSet, String escalationRef, boolean isCancelling) { assertNotNull(executionSet); assertNotNull(executionSet.getEscalationRef()); assertNotNull(executionSet.getCancelActivity()); assertEquals(escalationRef, executionSet.getEscalationRef().getValue()); assertEquals(isCancelling, executionSet.getCancelActivity().getValue()); } }
private void assertEscalationEventExecutionSet(EscalationEventExecutionSet executionSet, String escalationRef) { assertNotNull(executionSet); assertNotNull(executionSet.getEscalationRef()); assertEquals(escalationRef, executionSet.getEscalationRef().getValue()); } }
@Test public void testIntermediateEscalationThrowingEventEqualsAndHashCode() { String ESCALATION_REF = "ESCALATION_REF"; String ESCALATION_REF_1 = "ESCALATION_REF_1"; TestCaseBuilder.newTestCase() .addTrueCase(new IntermediateEscalationEventThrowing(), new IntermediateEscalationEventThrowing()) .addTrueCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet()), new IntermediateEscalationEventThrowing(new BPMNGeneralSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet())) .addFalseCase(new IntermediateEscalationEventThrowing(), null) .addTrueCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet()), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet())) .addTrueCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)))) .addFalseCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name1", "doc1"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)))) .addFalseCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF_1)))) .addFalseCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(null))) .addFalseCase(new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF))), new IntermediateEscalationEventThrowing(new BPMNGeneralSet("name", "doc"), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), null)) .test(); }
public CancellingEscalationEventExecutionSet() { this(new CancelActivity(true), new EscalationRef()); }
public EndEscalationEvent() { this(new BPMNGeneralSet(""), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new EscalationEventExecutionSet(), new DataIOSet()); }
public InterruptingEscalationEventExecutionSet() { this(new IsInterrupting(true), new EscalationRef()); }
@Test public void testEscalationRefEqualsAndHashCode() { TestCaseBuilder.newTestCase() .addTrueCase(new EscalationRef(), new EscalationRef()) .addTrueCase(new EscalationRef("ref"), new EscalationRef("ref")) .addTrueCase(new EscalationRef(null), new EscalationRef(null)) .addFalseCase(new EscalationRef("ref"), null) .addFalseCase(new EscalationRef("ref"), new EscalationRef("ref1")) .test(); }