use of org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue in project kie-wb-common by kiegroup.
the class DataObjectTest method setType.
@Test
public void setType() {
DataObjectType type = new DataObjectType(new DataObjectTypeValue(this.getClass().getSimpleName()));
dataObject.setType(type);
assertEquals(type, dataObject.getType());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue in project kie-wb-common by kiegroup.
the class DataObjectTypeWidget method notifyModelChanged.
@Override
public void notifyModelChanged() {
String currentValue = dataType.getValue();
if (currentValue != null && !currentValue.equals(oldValue)) {
setValue(new DataObjectTypeValue(currentValue), true);
}
oldValue = currentValue;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue 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);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue in project kie-wb-common by kiegroup.
the class AssignmentsEditorWidgetProcessVariablesTest method testGetProcessVariableFromDataObjects.
@Test
public void testGetProcessVariableFromDataObjects() {
DataObject dataObject = new DataObject();
dataObject.getGeneral().getDocumentation().setValue("doc");
dataObject.setName(new Name("name"));
dataObject.setType(new DataObjectType(new DataObjectTypeValue("com.myType.dataObject")));
final String uuid = UUID.uuid();
when(dataObjectNode.getUUID()).thenReturn("uuid");
when(dataObjectNode.getContent()).thenReturn(dataObjectView);
when(dataObjectView.getDefinition()).thenReturn(dataObject);
graphNodes.clear();
graphNodes.add(dataObjectNode);
graphNodes.add(parentNode);
when(parentNodeView.getDefinition()).thenReturn(dataObjectNode);
when(dataObjectNode.getUUID()).thenReturn("rootId");
createWidget();
assertEquals(dataObject.getName().getValue() + ":" + dataObject.getType().getValue().getType(), widget.getProcessVariables());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue in project kie-wb-common by kiegroup.
the class DataObjectTypeWidgetTest method testSetTextBoxModelValueCustomDataType.
@Test
public void testSetTextBoxModelValueCustomDataType() {
final DataObjectTypeValue myValue = new DataObjectTypeValue("com.custom.myClass");
DataObjectTypeWidget.doneLoading = true;
widget.setValue(myValue);
verify(dataType, times(1)).setValue("com.custom.myClass");
}
Aggregations