use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport in project kie-wb-common by kiegroup.
the class DiagramSetTest method testHashCode.
@Test
public void testHashCode() {
DiagramSet a = new DiagramSet();
DiagramSet b = new DiagramSet();
assertEquals(a.hashCode(), b.hashCode());
DefaultImport defaultImport = new DefaultImport("className");
WSDLImport wsdlImport = new WSDLImport("location", "namespace");
ImportsValue importsValue = new ImportsValue();
importsValue.addImport(defaultImport);
importsValue.addImport(wsdlImport);
DiagramSet c = new DiagramSet();
c.setImports(new Imports(importsValue));
DiagramSet d = new DiagramSet();
assertNotEquals(c.hashCode(), d.hashCode());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport in project kie-wb-common by kiegroup.
the class DefaultImportsEditorWidgetTest method testAddDataTypesFromImports.
@Test
public void testAddDataTypesFromImports() {
ImportsValue value = new ImportsValue();
DefaultImport defaultImport = new DefaultImport();
tested.refreshFormsEvent = refreshFormsEvent;
defaultImport.setClassName("MyString");
value.addImport(defaultImport);
tested.addDataTypes(value);
verify(dataTypeNamesService, times(1)).add(eq("MyString"), any());
value = new ImportsValue();
defaultImport = new DefaultImport();
defaultImport.setClassName("String");
value.addImport(defaultImport);
tested.addDataTypes(value);
verify(dataTypeNamesService, times(0)).add(eq("String"), anyString());
value = new ImportsValue();
defaultImport = new DefaultImport();
defaultImport.setClassName("Object");
value.addImport(defaultImport);
tested.addDataTypes(value);
verify(dataTypeNamesService, times(0)).add(eq("Object"), anyString());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport in project kie-wb-common by kiegroup.
the class DefaultImportsEditorWidgetTest method createImport.
@Test
public void createImport() {
DefaultImport result = tested.createImport();
assertNotNull(result);
assertNull(result.getClassName());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport in project kie-wb-common by kiegroup.
the class DefaultImportListItemWidgetViewTest method setModel.
@Test
public void setModel() {
DefaultImport model = mock(DefaultImport.class);
tested.setModel(model);
verify(defaultImportDataBinder).setModel(model);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport in project kie-wb-common by kiegroup.
the class DefaultImportsElementTest method importTypeDataOf.
@Test
public void importTypeDataOf() {
DefaultImportsElement defaultImportsElement = new DefaultImportsElement(NAME);
DefaultImport defaultImport = new DefaultImport(CLASS_NAME);
ImportType importType = defaultImportsElement.importTypeDataOf(defaultImport);
assertEquals(CLASS_NAME, importType.getName());
}
Aggregations