Search in sources :

Example 6 with WSDLImport

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());
    }
}
Also used : WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Import(org.eclipse.bpmn2.Import) WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Test(org.junit.Test)

Example 7 with WSDLImport

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());
}
Also used : WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Import(org.eclipse.bpmn2.Import) WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Test(org.junit.Test)

Example 8 with WSDLImport

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());
}
Also used : DefaultImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport) ImportsValue(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.ImportsValue) Imports(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.Imports) WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Test(org.junit.Test)

Example 9 with WSDLImport

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);
}
Also used : DefaultImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport) ImportsValue(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.ImportsValue) Imports(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.Imports) WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Test(org.junit.Test)

Example 10 with WSDLImport

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());
}
Also used : WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Import(org.eclipse.bpmn2.Import) WSDLImport(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport) Test(org.junit.Test)

Aggregations

WSDLImport (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.WSDLImport)12 Test (org.junit.Test)8 ImportsValue (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.ImportsValue)7 DefaultImport (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.DefaultImport)6 Import (org.eclipse.bpmn2.Import)5 Imports (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.imports.Imports)5 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)2 AdHoc (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.AdHoc)2 DiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet)2 Executable (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Executable)2 Id (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id)2 Package (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package)2 ProcessInstanceDescription (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessInstanceDescription)2 ProcessType (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessType)2 Version (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Version)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)2 ArrayList (java.util.ArrayList)1 Definitions (org.eclipse.bpmn2.Definitions)1