use of org.activiti.engine.identity.GroupQuery in project Activiti by Activiti.
the class GroupQueryTest method testQueryByInvalidName.
public void testQueryByInvalidName() {
GroupQuery query = identityService.createGroupQuery().groupName("invalid");
verifyQueryResults(query, 0);
try {
identityService.createGroupQuery().groupName(null).list();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.identity.GroupQuery in project Activiti by Activiti.
the class GroupQueryTest method testQueryByInvalidId.
public void testQueryByInvalidId() {
GroupQuery query = identityService.createGroupQuery().groupId("invalid");
verifyQueryResults(query, 0);
try {
identityService.createGroupQuery().groupId(null).list();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.identity.GroupQuery in project Activiti by Activiti.
the class GroupQueryTest method testQueryByMember.
public void testQueryByMember() {
GroupQuery query = identityService.createGroupQuery().groupMember("fozzie");
verifyQueryResults(query, 2);
query = identityService.createGroupQuery().groupMember("kermit");
verifyQueryResults(query, 3);
query = query.orderByGroupId().asc();
List<Group> groups = query.list();
assertEquals(3, groups.size());
assertEquals("admin", groups.get(0).getId());
assertEquals("frogs", groups.get(1).getId());
assertEquals("muppets", groups.get(2).getId());
query = query.groupType("user");
groups = query.list();
assertEquals(2, groups.size());
assertEquals("frogs", groups.get(0).getId());
assertEquals("muppets", groups.get(1).getId());
}
use of org.activiti.engine.identity.GroupQuery in project Activiti by Activiti.
the class GroupQueryTest method testQueryByName.
public void testQueryByName() {
GroupQuery query = identityService.createGroupQuery().groupName("Muppet show characters");
verifyQueryResults(query, 1);
query = identityService.createGroupQuery().groupName("Famous frogs");
verifyQueryResults(query, 1);
}
use of org.activiti.engine.identity.GroupQuery in project Activiti by Activiti.
the class GroupQueryTest method testQueryByNameLike.
public void testQueryByNameLike() {
GroupQuery query = identityService.createGroupQuery().groupNameLike("%Famous%");
verifyQueryResults(query, 2);
query = identityService.createGroupQuery().groupNameLike("Famous%");
verifyQueryResults(query, 2);
query = identityService.createGroupQuery().groupNameLike("%show%");
verifyQueryResults(query, 1);
}
Aggregations