@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(); }
public IntermediateEscalationEventThrowing() { this(new BPMNGeneralSet(""), new DataIOSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new EscalationEventExecutionSet()); }
public EndEscalationEvent() { this(new BPMNGeneralSet(""), new BackgroundSet(), new FontSet(), new CircleDimensionSet(new Radius()), new EscalationEventExecutionSet(), new DataIOSet()); }
@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(); }
@Test public void testEndEscalationEventEqualsAndHashCode() { String ESCALATION_REF = "ESCALATION_REF"; String ESCALATION_REF_1 = "ESCALATION_REF_1"; TestCaseBuilder.newTestCase() .addTrueCase(new EndEscalationEvent(), new EndEscalationEvent()) .addTrueCase(new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(), new DataIOSet())) .addFalseCase(new EndEscalationEvent(), null) .addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(), new DataIOSet())) .addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())) .addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())) .addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF_1)), new DataIOSet())) .addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet("data"))) .addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(null), new DataIOSet())) .addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), null, new DataIOSet())) .test(); }
private BpmnNode escalationEvent( IntermediateThrowEvent event, EscalationEventDefinition eventDefinition) { Node<View<IntermediateEscalationEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateEscalationEventThrowing.class); IntermediateEscalationEventThrowing definition = node.getContent().getDefinition(); EventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet(new DataIOSet( p.getAssignmentsInfo() )); definition.setExecutionSet(new EscalationEventExecutionSet( new EscalationRef(EventDefinitionReader.escalationRefOf(eventDefinition)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode escalationEventDefinition(EndEvent event, EscalationEventDefinition e) { Node<View<EndEscalationEvent>, Edge> node = factoryManager.newNode(event.getId(), EndEscalationEvent.class); EndEscalationEvent definition = node.getContent().getDefinition(); EventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet(new DataIOSet( p.getAssignmentsInfo() )); definition.setExecutionSet(new EscalationEventExecutionSet( new EscalationRef(EventDefinitionReader.escalationRefOf(e)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }