Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.jbpm.process.workitem.bpmn2;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
Expand Down Expand Up @@ -217,8 +218,14 @@ public void testServiceInvocationWithMultipleParams() throws Exception {
WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.startProcess("multiparamws",
params);
String variable = (String) processInstance.getVariable("s2");
assertEquals("Hello doe, john",
variable);

assertNotNull(variable);
assertTrue(variable.startsWith("Hello "));

String[] parts = variable.substring("Hello ".length()).split(",\\s*");
java.util.Arrays.sort(parts);
assertArrayEquals(new String[]{"doe", "john"}, parts);

assertEquals(ProcessInstance.STATE_COMPLETED,
processInstance.getState());
}
Expand All @@ -238,8 +245,14 @@ public void testServiceInvocationWithMultipleIntParams() throws Exception {
WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.startProcess("multiparamws-int",
params);
String variable = (String) processInstance.getVariable("s2");
assertEquals("Hello 2, 3",
variable);

assertNotNull(variable);
assertTrue(variable.startsWith("Hello "));

String[] nums = variable.substring("Hello ".length()).split(",\\s*");
java.util.Arrays.sort(nums);
assertArrayEquals(new String[]{"2", "3"}, nums);

assertEquals(ProcessInstance.STATE_COMPLETED,
processInstance.getState());
}
Expand Down