Search in sources :

Example 1 with BackgroundSet

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

the class HashCodeAndEqualityTest method testEndEscalationEventEqualsAndHashCode.

@Test
public void testEndEscalationEventEqualsAndHashCode() {
    String ESCALATION_REF = "ESCALATION_REF";
    String ESCALATION_REF_1 = "ESCALATION_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new EndEscalationEvent(), new EndEscalationEvent()).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet())).addFalseCase(new EndEscalationEvent(), null).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(), new DataIOSet())).addTrueCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF_1)), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet("data"))).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(null), new DataIOSet())).addFalseCase(new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new EscalationEventExecutionSet(new EscalationRef(ESCALATION_REF)), new DataIOSet()), new EndEscalationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), null, new DataIOSet())).test();
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) InterruptingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) Test(org.junit.Test)

Example 2 with BackgroundSet

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

the class HashCodeAndEqualityTest method testIntermediateCompensationThrowingEventEqualsAndHashCode.

@Test
public void testIntermediateCompensationThrowingEventEqualsAndHashCode() {
    String ACTIVITY_REF = "ACTIVITY_REF";
    String ACTIVITY_REF_1 = "ACTIVITY_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new IntermediateCompensationEventThrowing(), new IntermediateCompensationEventThrowing()).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet()), new IntermediateCompensationEventThrowing(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet())).addFalseCase(new IntermediateCompensationEventThrowing(), null).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet()), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet())).addTrueCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(null))).addFalseCase(new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new IntermediateCompensationEventThrowing(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new DataIOSet(), new AdvancedData(), null)).test();
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) Test(org.junit.Test)

Example 3 with BackgroundSet

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

the class HashCodeAndEqualityTest method testEndCompensationEventEqualsAndHashCode.

@Test
public void testEndCompensationEventEqualsAndHashCode() {
    String ACTIVITY_REF = "ACTIVITY_REF";
    String ACTIVITY_REF_1 = "ACTIVITY_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new EndCompensationEvent(), new EndCompensationEvent()).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet()), new EndCompensationEvent(new BPMNGeneralSet(), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet())).addFalseCase(new EndCompensationEvent(), null).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet()), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet())).addTrueCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name1", "doc1"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF_1)))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(null))).addFalseCase(new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), new CompensationEventExecutionSet(new ActivityRef(ACTIVITY_REF))), new EndCompensationEvent(new BPMNGeneralSet("name", "doc"), new BackgroundSet(), new FontSet(), new CircleDimensionSet(), new AdvancedData(), null)).test();
}
Also used : FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) CircleDimensionSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) Test(org.junit.Test)

Example 4 with BackgroundSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet 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);
}
Also used : LinkEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) BgColor(org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor) LinkRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef) Test(org.junit.Test)

Example 5 with BackgroundSet

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

the class BaseArtifactsTest method setBackgroundSet.

@Test
public void setBackgroundSet() {
    BackgroundSet backgroundSet = new BackgroundSet();
    tested.setBackgroundSet(backgroundSet);
    assertEquals(backgroundSet, tested.getBackgroundSet());
}
Also used : BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) Test(org.junit.Test)

Aggregations

BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)15 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)12 Test (org.junit.Test)11 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)11 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)11 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)8 CircleDimensionSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.CircleDimensionSet)7 RectangleDimensionsSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet)5 Before (org.junit.Before)4 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)4 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)4 BgColor (org.kie.workbench.common.stunner.bpmn.definition.property.background.BgColor)3 CancellingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet)3 InterruptingEscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.InterruptingEscalationEventExecutionSet)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 SimulationSet (org.kie.workbench.common.stunner.bpmn.definition.property.simulation.SimulationSet)3 ReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess)2 ActivityRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef)2 CompensationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2