Search in sources :

Example 1 with SLADueDate

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

the class HashCodeAndEqualityTest method testCancellingSignalEventExecutionSetEqualsAndHashCode.

@Test
public void testCancellingSignalEventExecutionSetEqualsAndHashCode() {
    String SIGNAL_REF = "SIGNAL_REF";
    String SIGNAL_REF_1 = "SIGNAL_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new CancellingSignalEventExecutionSet(), new CancellingSignalEventExecutionSet()).addTrueCase(new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef()), new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef())).addTrueCase(new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef(SIGNAL_REF)), new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef(SIGNAL_REF))).addFalseCase(new CancellingSignalEventExecutionSet(), null).addFalseCase(new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef(SIGNAL_REF)), new CancellingSignalEventExecutionSet(new CancelActivity(false), new SLADueDate(), new SignalRef(SIGNAL_REF_1))).test();
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) CancellingSignalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Example 2 with SLADueDate

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

the class HashCodeAndEqualityTest method IntermediateMessageEventCatchingEquals.

@Test
public void IntermediateMessageEventCatchingEquals() {
    final String MESSAGE_REF = "message ref";
    final CancellingMessageEventExecutionSet A_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new SLADueDate(), new MessageRef(MESSAGE_REF, ""));
    final CancellingMessageEventExecutionSet B_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new SLADueDate(), new MessageRef(MESSAGE_REF, ""));
    final CancellingMessageEventExecutionSet C_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new SLADueDate(), new MessageRef("Other value", ""));
    final CancellingMessageEventExecutionSet D_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new SLADueDate(), new MessageRef(MESSAGE_REF, ""));
    final String ASSIGNMENT_INFO = "some value";
    final DataIOSet A_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet B_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet C_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
    final DataIOSet D_DATA_SET = new DataIOSet(new AssignmentsInfo("Other value"));
    IntermediateMessageEventCatching a = new IntermediateMessageEventCatching();
    a.setExecutionSet(A_EXECUTION_SET);
    a.setDataIOSet(A_DATA_SET);
    IntermediateMessageEventCatching b = new IntermediateMessageEventCatching();
    b.setExecutionSet(B_EXECUTION_SET);
    b.setDataIOSet(B_DATA_SET);
    IntermediateMessageEventCatching c = new IntermediateMessageEventCatching();
    c.setExecutionSet(C_EXECUTION_SET);
    c.setDataIOSet(C_DATA_SET);
    IntermediateMessageEventCatching d = new IntermediateMessageEventCatching();
    d.setExecutionSet(D_EXECUTION_SET);
    d.setDataIOSet(D_DATA_SET);
    assertEquals(a, a);
    assertEquals(a, b);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    assertNotEquals(a, 19);
    assertNotEquals(a, null);
    a.setExecutionSet(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    a.setExecutionSet(A_EXECUTION_SET);
    assertEquals(a, b);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    a.setDataIOSet(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    EndSignalEvent e = new EndSignalEvent();
    assertNotEquals(a, e);
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) CancellingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Example 3 with SLADueDate

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

the class HashCodeAndEqualityTest method testCancellingErrorEventExecutionSetEqualsAndHashCode.

@Test
public void testCancellingErrorEventExecutionSetEqualsAndHashCode() {
    String ERROR_REF = "ERROR_REF";
    String ERROR_REF_1 = "ERROR_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new CancellingErrorEventExecutionSet(), new CancellingErrorEventExecutionSet()).addTrueCase(new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef()), new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef())).addTrueCase(new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef(ERROR_REF)), new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef(ERROR_REF))).addFalseCase(new CancellingErrorEventExecutionSet(), null).addFalseCase(new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef(ERROR_REF)), new CancellingErrorEventExecutionSet(new CancelActivity(false), new SLADueDate(), new ErrorRef(ERROR_REF_1))).test();
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) CancellingErrorEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.CancellingErrorEventExecutionSet) ErrorRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Example 4 with SLADueDate

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

the class HashCodeAndEqualityTest method testCancellingMessageEventExecutionSetEqualsAndHashCode.

@Test
public void testCancellingMessageEventExecutionSetEqualsAndHashCode() {
    String MESSAGE_REF = "MESSAGE_REF";
    String MESSAGE_REF_1 = "MESSAGE_REF_1";
    TestCaseBuilder.newTestCase().addTrueCase(new CancellingMessageEventExecutionSet(), new CancellingMessageEventExecutionSet()).addTrueCase(new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef()), new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef())).addTrueCase(new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef(MESSAGE_REF, "")), new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef(MESSAGE_REF, ""))).addFalseCase(new CancellingMessageEventExecutionSet(), null).addFalseCase(new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef(MESSAGE_REF, "")), new CancellingMessageEventExecutionSet(new CancelActivity(false), new SLADueDate(), new MessageRef(MESSAGE_REF_1, ""))).test();
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) CancellingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Example 5 with SLADueDate

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

the class HashCodeAndEqualityTest method testCancellingTimerEventExecutionSetEqualsAndHashCode.

@Test
public void testCancellingTimerEventExecutionSetEqualsAndHashCode() {
    TimerSettingsValue TIMER_REF = new TimerSettingsValue("a1", "b1", "c1", "d1");
    TimerSettingsValue TIMER_REF_1 = new TimerSettingsValue("a2", "b2", "c2", "d2");
    TestCaseBuilder.newTestCase().addTrueCase(new CancellingTimerEventExecutionSet(), new CancellingTimerEventExecutionSet()).addTrueCase(new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings()), new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings())).addTrueCase(new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings(TIMER_REF)), new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings(TIMER_REF))).addFalseCase(new CancellingTimerEventExecutionSet(), null).addFalseCase(new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings(TIMER_REF)), new CancellingTimerEventExecutionSet(new CancelActivity(false), new SLADueDate(), new TimerSettings(TIMER_REF_1))).test();
}
Also used : SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) TimerSettings(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettings) CancellingTimerEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.CancellingTimerEventExecutionSet) TimerSettingsValue(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity) Test(org.junit.Test)

Aggregations

SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)64 Test (org.junit.Test)31 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)28 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)26 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)26 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)23 View (org.kie.workbench.common.stunner.core.graph.content.view.View)22 Edge (org.kie.workbench.common.stunner.core.graph.Edge)21 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)19 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)18 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)18 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)15 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)15 OnEntryAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction)14 OnExitAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction)14 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)12 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)11 IsMultipleInstance (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance)10 ScriptTypeValue (org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeValue)10 MultipleInstanceCollectionInput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput)9