Search in sources :

Example 1 with RootProcessAdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testNotEqualsAdvancedData.

@Test
public void testNotEqualsAdvancedData() {
    BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram();
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA)));
    RootProcessAdvancedData rootProcessAdvancedData = new RootProcessAdvancedData(new GlobalVariables(), new MetaDataAttributes());
    assertNotEquals(rootProcessAdvancedData, BPMNDiagramImpl.getAdvancedData());
    assertNotEquals(rootProcessAdvancedData.getGlobalVariables(), BPMNDiagramImpl.getAdvancedData().getGlobalVariables());
    assertNotEquals(rootProcessAdvancedData.getMetaDataAttributes(), BPMNDiagramImpl.getAdvancedData().getMetaDataAttributes());
}
Also used : MetaDataAttributes(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.MetaDataAttributes) RootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData) GlobalVariables(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) Test(org.junit.Test)

Example 2 with RootProcessAdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testBPMNDiagramEquals.

@Test
public void testBPMNDiagramEquals() {
    BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram();
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA)));
    BPMNDiagramImpl BPMNDiagramImpl2 = createValidBpmnDiagram();
    BPMNDiagramImpl2.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA)));
    assertEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables("id:"), new MetaDataAttributes("securityRoles3ß<![CDATA[employees,clients]]>")));
    assertNotEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes("securityRoles3ß<![CDATA[employees,clients]]>")));
    assertNotEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables("id:"), new MetaDataAttributes(METADATA)));
    assertNotEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA)));
    assertEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl.setDimensionsSet(new RectangleDimensionsSet(10d, 10d));
    BPMNDiagramImpl2.setDimensionsSet(new RectangleDimensionsSet(20d, 20d));
    assertNotEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
    BPMNDiagramImpl2.setDimensionsSet(new RectangleDimensionsSet(10d, 10d));
    assertEquals(BPMNDiagramImpl, BPMNDiagramImpl2);
}
Also used : MetaDataAttributes(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.MetaDataAttributes) RootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData) GlobalVariables(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) RectangleDimensionsSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet) Test(org.junit.Test)

Example 3 with RootProcessAdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testNotAdvancedData.

@Test
public void testNotAdvancedData() {
    ProcessData processData = new ProcessData(GLOBAL_VARIABLES);
    RootProcessAdvancedData rootProcessAdvancedData = new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA));
    assertNotEquals(rootProcessAdvancedData, processData);
}
Also used : MetaDataAttributes(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.MetaDataAttributes) RootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData) GlobalVariables(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Test(org.junit.Test)

Example 4 with RootProcessAdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testSetAdvancedData.

@Test
public void testSetAdvancedData() {
    BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram();
    BPMNDiagramImpl.setAdvancedData(new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA)));
    RootProcessAdvancedData advancedData = new RootProcessAdvancedData(new GlobalVariables(GLOBAL_VARIABLES), new MetaDataAttributes(METADATA));
    assertEquals(advancedData, BPMNDiagramImpl.getAdvancedData());
    assertEquals(advancedData.getGlobalVariables(), BPMNDiagramImpl.getAdvancedData().getGlobalVariables());
    assertEquals(advancedData.getMetaDataAttributes(), BPMNDiagramImpl.getAdvancedData().getMetaDataAttributes());
}
Also used : MetaDataAttributes(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.MetaDataAttributes) RootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData) GlobalVariables(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) Test(org.junit.Test)

Example 5 with RootProcessAdvancedData

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testSetGlobalVariables.

@Test
public void testSetGlobalVariables() {
    RootProcessAdvancedData rootProcessAdvancedData = new RootProcessAdvancedData();
    assertEquals(rootProcessAdvancedData.getGlobalVariables(), new GlobalVariables());
    rootProcessAdvancedData.setGlobalVariables(new GlobalVariables(GLOBAL_VARIABLES));
    assertEquals(rootProcessAdvancedData.getGlobalVariables(), new GlobalVariables(GLOBAL_VARIABLES));
}
Also used : RootProcessAdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData) GlobalVariables(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables) Test(org.junit.Test)

Aggregations

GlobalVariables (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.GlobalVariables)7 RootProcessAdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.RootProcessAdvancedData)7 Test (org.junit.Test)6 MetaDataAttributes (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.MetaDataAttributes)6 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)4 RectangleDimensionsSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet)2 Before (org.junit.Before)1 EmbeddedSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1 Actors (org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Actors)1 Groupid (org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Groupid)1 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)1 CaseManagementSet (org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseManagementSet)1 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)1 AdHoc (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.AdHoc)1 DiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet)1 Executable (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Executable)1 Id (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id)1 Package (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package)1 ProcessInstanceDescription (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessInstanceDescription)1