@Test public void testEvent() { EventGateway gateway = new EventGateway(); gateway.getGeneral().getName().setValue(NAME); gateway.getGeneral().getDocumentation().setValue(DOCUMENTATION); Node<View<BaseGateway>, ?> node = newNode(UUID, gateway); when(propertyWriterFactory.of(any(org.eclipse.bpmn2.EventBasedGateway.class))).thenReturn(gatewayPropertyWriter); assertEquals(gatewayPropertyWriter, converter.toFlowElement(node)); verifyCommonValues(gatewayPropertyWriter, node); }
private PropertyWriter event(Node<View<EventGateway>, ?> n) { GatewayPropertyWriter p = propertyWriterFactory.of(bpmn2.createEventBasedGateway()); p.setId(n.getUUID()); p.setGatewayDirection(GatewayDirection.DIVERGING); EventGateway definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setAbsoluteBounds(n); return p; }
GatewayConverter { private PropertyWriter event(Node<View<EventGateway>, ?> n) { GatewayPropertyWriter p = propertyWriterFactory.of(bpmn2.createEventBasedGateway()); p.setId(n.getUUID()); p.setGatewayDirection(GatewayDirection.DIVERGING); EventGateway definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setAbsoluteBounds(n); return p; } }
GatewayConverter { private PropertyWriter event(Node<View<EventGateway>, ?> n) { GatewayPropertyWriter p = propertyWriterFactory.of(bpmn2.createEventBasedGateway()); p.setId(n.getUUID()); p.setGatewayDirection(GatewayDirection.DIVERGING); EventGateway definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setAbsoluteBounds(n); return p; } GatewayConverter(PropertyWriterFactory propertyWriterFactory); }
GatewayConverter { private PropertyWriter event(Node<View<EventGateway>, ?> n) { GatewayPropertyWriter p = propertyWriterFactory.of(bpmn2.createEventBasedGateway()); p.setId(n.getUUID()); p.setGatewayDirection(GatewayDirection.DIVERGING); EventGateway definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setAbsoluteBounds(n); return p; } GatewayConverter(PropertyWriterFactory propertyWriterFactory); PropertyWriter toFlowElement(Node<View<BaseGateway>, ?> node); }
GatewayConverter { private PropertyWriter event(Node<View<EventGateway>, ?> n) { GatewayPropertyWriter p = propertyWriterFactory.of(bpmn2.createEventBasedGateway()); p.setId(n.getUUID()); p.setGatewayDirection(GatewayDirection.DIVERGING); EventGateway definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setAbsoluteBounds(n); return p; } GatewayConverter(PropertyWriterFactory propertyWriterFactory); PropertyWriter toFlowElement(Node<View<BaseGateway>, ?> node);  }