use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport in project kie-wb-common by kiegroup.
the class DefinitionsPropertyReaderTest method getWSDLImports.
@Test
public void getWSDLImports() {
final String LOCATION = "location";
final String NAMESPACE = "namespace";
final int QTY = 10;
for (int i = 0; i < QTY; i++) {
Import imp = PropertyWriterUtils.toImport(new WSDLImport(LOCATION + i, NAMESPACE + i));
definitions.getImports().add(imp);
}
List<WSDLImport> wsdlImports = tested.getWSDLImports();
assertEquals(QTY, wsdlImports.size());
for (int i = 0; i < QTY; i++) {
assertEquals(LOCATION + i, wsdlImports.get(i).getLocation());
assertEquals(NAMESPACE + i, wsdlImports.get(i).getNamespace());
}
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport in project kie-wb-common by kiegroup.
the class PropertyWriterUtilsTest method toImport.
@Test
public void toImport() {
final String LOCATION = "location";
final String NAMESPACE = "namespace";
WSDLImport wsdlImport = new WSDLImport(LOCATION, NAMESPACE);
Import imp = PropertyWriterUtils.toImport(wsdlImport);
assertEquals(LOCATION, imp.getLocation());
assertEquals(NAMESPACE, imp.getNamespace());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport in project kie-wb-common by kiegroup.
the class DiagramSetTest method testSetImports.
@Test
public void testSetImports() {
DefaultImport defaultImport = new DefaultImport("className");
WSDLImport wsdlImport = new WSDLImport("location", "namespace");
ImportsValue importsValue = new ImportsValue();
importsValue.addImport(defaultImport);
importsValue.addImport(wsdlImport);
Imports imports = new Imports(importsValue);
DiagramSet diagramSet = new DiagramSet();
diagramSet.setImports(imports);
assertEquals(imports, diagramSet.getImports());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport in project kie-wb-common by kiegroup.
the class DiagramSetTest method testEquals.
@Test
public void testEquals() {
DiagramSet a = new DiagramSet();
DiagramSet b = new DiagramSet();
assertEquals(a, b);
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, d);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport in project kie-wb-common by kiegroup.
the class PropertyReaderUtilsTest method toWSDLImports.
@Test
public void toWSDLImports() {
final String LOCATION = "location";
final String NAMESPACE = "namespace";
WSDLImport wsdlImport = new WSDLImport(LOCATION, NAMESPACE);
Import imp = PropertyWriterUtils.toImport(wsdlImport);
WSDLImport result = PropertyReaderUtils.toWSDLImports(imp);
assertEquals("location", result.getLocation());
assertEquals("namespace", result.getNamespace());
}
Aggregations