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());
}
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);
}
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);
}
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());
}
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));
}
Aggregations