use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testIntermediateLinkCatchEventEquals.
@Test
public void testIntermediateLinkCatchEventEquals() {
IntermediateLinkEventCatching linkEvent = new IntermediateLinkEventCatching();
IntermediateLinkEventCatching linkEvent2 = new IntermediateLinkEventCatching();
assertNotEquals(linkEvent, null);
assertNotEquals(linkEvent, "");
assertEquals(linkEvent, linkEvent);
assertEquals(linkEvent, linkEvent2);
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("black"));
linkEvent.setBackgroundSet(backgroundSet);
assertNotEquals(linkEvent, linkEvent2);
linkEvent2.setBackgroundSet(backgroundSet);
assertEquals(linkEvent, linkEvent2);
linkEvent.setBackgroundSet(backgroundSet);
linkEvent.setExecutionSet(new LinkEventExecutionSet(new LinkRef("value")));
assertNotEquals(linkEvent, linkEvent2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor in project kie-wb-common by kiegroup.
the class BaseArtifactsTest method testEquals.
@Test
public void testEquals() {
assertTrue(tested.equals(new DataObject()));
assertFalse(tested.equals(""));
final DataObject dataObject = new DataObject();
BgColor color = new BgColor();
color.setValue("Black");
dataObject.getBackgroundSet().setBgColor(color);
assertFalse(tested.equals(dataObject));
tested.getBackgroundSet().setBgColor(color);
assertTrue(tested.equals(dataObject));
dataObject.getFontSet().setFontSize(new FontSize(11.0));
assertFalse(tested.equals(dataObject));
tested.getFontSet().setFontSize(new FontSize(11.0));
assertTrue(tested.equals(dataObject));
dataObject.getDimensionsSet().setHeight(new Height(11.0));
assertFalse(tested.equals(dataObject));
tested.getDimensionsSet().setHeight(new Height(11.0));
assertTrue(tested.equals(dataObject));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor in project kie-wb-common by kiegroup.
the class DataObjectTest method testNotEquals.
@Test
public void testNotEquals() {
DataObject dataObject1 = new DataObject();
DataObject dataObject2 = new DataObject();
dataObject1.setName(new Name("dataObject1"));
dataObject2.setName(new Name("dataObject2"));
// Test Name
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setName(new Name("dataObject1"));
assertEquals(dataObject1, dataObject2);
// Test Type
DataObjectType dataObjectType = new DataObjectType();
dataObjectType.setValue(new DataObjectTypeValue("someType"));
dataObject2.setType(dataObjectType);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setType(new DataObjectType());
assertEquals(dataObject1, dataObject2);
// Test General Set
BPMNGeneralSet generalSet = new BPMNGeneralSet();
generalSet.setName(new Name("someName"));
dataObject2.setGeneral(generalSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setGeneral(new BPMNGeneralSet());
assertEquals(dataObject1, dataObject2);
// Test Background Set
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("Black"));
dataObject2.setBackgroundSet(backgroundSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setBackgroundSet(new BackgroundSet());
assertEquals(dataObject1, dataObject2);
// Test Font Set
FontSet fontSet = new FontSet();
fontSet.setFontSize(new FontSize(11.0));
dataObject2.setFontSet(fontSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setFontSet(new FontSet());
assertEquals(dataObject1, dataObject2);
// Test Dimension Set
RectangleDimensionsSet rectangleDimensionsSet = new RectangleDimensionsSet(100.0, 100.0);
dataObject2.setDimensionsSet(rectangleDimensionsSet);
assertNotEquals(dataObject1, dataObject2);
// Reset
dataObject2.setDimensionsSet(new RectangleDimensionsSet());
assertEquals(dataObject1, dataObject2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testIntermediateLinkThrowingEventEquals.
@Test
public void testIntermediateLinkThrowingEventEquals() {
IntermediateLinkEventThrowing linkEvent = new IntermediateLinkEventThrowing();
IntermediateLinkEventThrowing linkEvent2 = new IntermediateLinkEventThrowing();
assertNotEquals(linkEvent, null);
assertNotEquals(linkEvent, "");
assertEquals(linkEvent, linkEvent);
assertEquals(linkEvent, linkEvent2);
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("black"));
linkEvent.setBackgroundSet(backgroundSet);
assertNotEquals(linkEvent, linkEvent2);
linkEvent2.setBackgroundSet(backgroundSet);
assertEquals(linkEvent, linkEvent2);
linkEvent.setBackgroundSet(backgroundSet);
linkEvent.setExecutionSet(new LinkEventExecutionSet(new LinkRef("value")));
assertNotEquals(linkEvent, linkEvent2);
}
Aggregations