use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockMultipleInstanceSubprocess.
private MultipleInstanceSubprocess mockMultipleInstanceSubprocess(String name, String inputVariable, String outputVariable) {
MultipleInstanceSubprocess result = mock(MultipleInstanceSubprocess.class);
BPMNGeneralSet generalSet = mockGeneralSet(name);
when(result.getGeneral()).thenReturn(generalSet);
MultipleInstanceSubprocessTaskExecutionSet executionSet = mock(MultipleInstanceSubprocessTaskExecutionSet.class);
when(result.getExecutionSet()).thenReturn(executionSet);
MultipleInstanceCollectionInput input = mock(MultipleInstanceCollectionInput.class);
when(input.getValue()).thenReturn(inputVariable);
when(executionSet.getMultipleInstanceCollectionInput()).thenReturn(input);
MultipleInstanceDataInput dataInput = mock(MultipleInstanceDataInput.class);
when(executionSet.getMultipleInstanceDataInput()).thenReturn(dataInput);
MultipleInstanceCollectionOutput output = mock(MultipleInstanceCollectionOutput.class);
when(output.getValue()).thenReturn(outputVariable);
when(executionSet.getMultipleInstanceCollectionOutput()).thenReturn(output);
MultipleInstanceDataOutput dataOutput = mock(MultipleInstanceDataOutput.class);
when(executionSet.getMultipleInstanceDataOutput()).thenReturn(dataOutput);
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockUserTask.
private BaseUserTask mockUserTask(String name, String assignmentsInfoValue, String inputCollection, String outputCollection) {
UserTask result = mock(UserTask.class);
TaskGeneralSet generalSet = mockTaskGeneralSet(name);
when(result.getGeneral()).thenReturn(generalSet);
UserTaskExecutionSet executionSet = mock(UserTaskExecutionSet.class);
when(result.getExecutionSet()).thenReturn(executionSet);
AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
when(executionSet.getAssignmentsinfo()).thenReturn(assignmentsInfo);
IsMultipleInstance isMultipleInstance = mock(IsMultipleInstance.class);
when(isMultipleInstance.getValue()).thenReturn(true);
MultipleInstanceCollectionInput miInputCollection = mock(MultipleInstanceCollectionInput.class);
when(miInputCollection.getValue()).thenReturn(inputCollection);
MultipleInstanceDataInput miDataInput = mock(MultipleInstanceDataInput.class);
MultipleInstanceCollectionOutput miOutputCollection = mock(MultipleInstanceCollectionOutput.class);
MultipleInstanceDataOutput miDataOutput = mock(MultipleInstanceDataOutput.class);
when(miOutputCollection.getValue()).thenReturn(outputCollection);
when(executionSet.getIsMultipleInstance()).thenReturn(isMultipleInstance);
when(executionSet.getMultipleInstanceCollectionInput()).thenReturn(miInputCollection);
when(executionSet.getMultipleInstanceDataInput()).thenReturn(miDataInput);
when(executionSet.getMultipleInstanceCollectionOutput()).thenReturn(miOutputCollection);
when(executionSet.getMultipleInstanceDataOutput()).thenReturn(miDataOutput);
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testEqualTrue.
@Test
public void testEqualTrue() {
GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
a.setGenericServiceTaskInfo(new GenericServiceTaskInfo());
assertEquals(a, b);
GenericServiceTaskExecutionSet c = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
GenericServiceTaskExecutionSet d = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
assertEquals(c, d);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testEqualFalse.
@Test
public void testEqualFalse() {
GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
a.setGenericServiceTaskInfo(null);
assertNotEquals(a, b);
GenericServiceTaskExecutionSet c = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
GenericServiceTaskExecutionSet d = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_2));
assertNotEquals(c, d);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testHashCode.
@Test
public void testHashCode() {
GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
assertEquals(a.hashCode(), b.hashCode());
GenericServiceTaskExecutionSet c = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
GenericServiceTaskExecutionSet d = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
assertEquals(c.hashCode(), d.hashCode());
}
Aggregations