use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method compensationEvent.
@Test
public void compensationEvent() {
Node node = createIntermediateCompensationEventThrowingNode();
PropertyWriter propertyWriter = tested.compensationEvent(node);
assertNotNull(propertyWriter);
verifyCommonProperties(node);
verify(throwEventPropertyWriter).addCompensation();
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method linkEvent.
@Test
public void linkEvent() {
Node node = createIntermediateLinkEventThrowingNode();
PropertyWriter propertyWriter = tested.linkEvent(node);
assertNotNull(propertyWriter);
verifyCommonProperties(node);
verify(throwEventPropertyWriter).addLink(linkRef);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method escalationEvent.
@Test
public void escalationEvent() {
Node node = createIntermediateEscalationEventThrowingNode();
PropertyWriter propertyWriter = tested.escalationEvent(node);
assertNotNull(propertyWriter);
verifyCommonProperties(node);
verify(throwEventPropertyWriter).addEscalation(escalationRef);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.
the class ArtifactsConverterTest method toTextAnnotationElement.
@Test
public void toTextAnnotationElement() {
TextAnnotation textAnnotation = new TextAnnotation();
textAnnotation.getGeneral().getDocumentation().setValue(DOC);
textAnnotation.getGeneral().getName().setValue(NAME);
textAnnotationNode = new NodeImpl<>(UUID.uuid());
textAnnotationNode.setContent(textAnnotationView);
when(textAnnotationView.getDefinition()).thenReturn(textAnnotation);
when(propertyWriterFactory.of(any(org.eclipse.bpmn2.TextAnnotation.class))).thenReturn(textAnnotationWriter);
artifactsConverter = new ArtifactsConverter(propertyWriterFactory);
PropertyWriter propertyWriter = artifactsConverter.toElement(((NodeImpl) textAnnotationNode));
verify(textAnnotationWriter).setName(NAME);
verify(textAnnotationWriter).setDocumentation(DOC);
verify(textAnnotationWriter).setAbsoluteBounds(textAnnotationNode);
assertEquals(textAnnotationWriter, propertyWriter);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter in project kie-wb-common by kiegroup.
the class ArtifactsConverterTest method toDataObjectElement.
@Test
public void toDataObjectElement() {
DataObject dataObject = new DataObject();
dataObject.getGeneral().getDocumentation().setValue(DOC);
dataObject.setName(new Name(NAME));
dataObject.setType(new DataObjectType(new DataObjectTypeValue(NAME)));
dataObjectNode = new NodeImpl<>(UUID.uuid());
dataObjectNode.setContent(dataObjectView);
when(dataObjectView.getDefinition()).thenReturn(dataObject);
when(propertyWriterFactory.of(any(org.eclipse.bpmn2.DataObjectReference.class))).thenReturn(dataObjectWriter);
artifactsConverter = new ArtifactsConverter(propertyWriterFactory);
PropertyWriter propertyWriter = artifactsConverter.toElement(((NodeImpl) dataObjectNode));
verify(dataObjectWriter).setName(NAME);
verify(dataObjectWriter).setType(NAME);
verify(dataObjectWriter).setAbsoluteBounds(dataObjectNode);
assertEquals(dataObjectWriter, propertyWriter);
}
Aggregations