use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryByFirstName.
public void testQueryByFirstName() {
UserQuery query = identityService.createUserQuery().userFirstName("Gonzo");
verifyQueryResults(query, 1);
User result = query.singleResult();
assertEquals("gonzo", result.getId());
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryById.
public void testQueryById() {
UserQuery query = identityService.createUserQuery().userId("kermit");
verifyQueryResults(query, 1);
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryByNoCriteria.
public void testQueryByNoCriteria() {
UserQuery query = identityService.createUserQuery();
verifyQueryResults(query, 3);
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryByInvalidEmail.
public void testQueryByInvalidEmail() {
UserQuery query = identityService.createUserQuery().userEmail("invalid");
verifyQueryResults(query, 0);
try {
identityService.createUserQuery().userEmail(null).singleResult();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryByFirstNameLike.
public void testQueryByFirstNameLike() {
UserQuery query = identityService.createUserQuery().userFirstNameLike("%o%");
verifyQueryResults(query, 2);
query = identityService.createUserQuery().userFirstNameLike("Ker%");
verifyQueryResults(query, 1);
}
Aggregations