package unittest; import java.util.*; import org.jbpm.api.*; import org.jbpm.api.job.*; import org.jbpm.api.task.*; import org.jbpm.test.*; public class X2678DuplicatedGroupTasksTest extends JbpmTestCase { protected void setUp() throws Exception { super.setUp(); identityService.createUser("lingo", "lingo", "lingosurf168@gmail.com"); identityService.createGroup("group1"); identityService.createGroup("group2"); identityService.createGroup("group3"); identityService.createMembership("lingo", "group1", ""); identityService.createMembership("lingo", "group2", ""); identityService.createMembership("lingo", "group3", ""); deployJpdlXmlString( "" + " " + " " + " " + " " + " " + " " + " " + ""); } protected void tearDown() throws Exception { identityService.deleteUser("lingo"); identityService.deleteGroup("group1"); identityService.deleteGroup("group2"); identityService.deleteGroup("group3"); super.tearDown(); } public void testFindGroupTasks() throws Exception { ProcessInstance processInstance = executionService .startProcessInstanceByKey("X2678DuplicatedGroupTasksTest"); List tasks = taskService.findGroupTasks("lingo"); assertEquals(1, tasks.size()); } public void testTaskQueryCount() throws Exception { ProcessInstance processInstance = executionService .startProcessInstanceByKey("X2678DuplicatedGroupTasksTest"); long count = taskService.createTaskQuery().candidate("lingo") .count(); assertEquals(1, count); } }