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