use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryTest method testQueryByInvalidLastNameLike.
public void testQueryByInvalidLastNameLike() {
UserQuery query = identityService.createUserQuery().userLastNameLike("%invalid%");
verifyQueryResults(query, 0);
try {
identityService.createUserQuery().userLastNameLike(null).singleResult();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryEscapeClauseTest method testQueryByFullNameLike.
public void testQueryByFullNameLike() {
UserQuery query = identityService.createUserQuery().userFullNameLike("%og\\%%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("kermit", query.singleResult().getId());
query = identityService.createUserQuery().userFullNameLike("%it\\%%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("kermit", query.singleResult().getId());
query = identityService.createUserQuery().userFullNameLike("%ar\\_%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("fozzie", query.singleResult().getId());
query = identityService.createUserQuery().userFullNameLike("%ie\\_%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("fozzie", query.singleResult().getId());
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryEscapeClauseTest method testQueryByEmailLike.
public void testQueryByEmailLike() {
UserQuery query = identityService.createUserQuery().userEmailLike("%\\%%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("kermit", query.singleResult().getId());
query = identityService.createUserQuery().userEmailLike("%\\_%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("fozzie", query.singleResult().getId());
}
use of org.activiti.engine.identity.UserQuery in project Activiti by Activiti.
the class UserQueryEscapeClauseTest method testQueryByFirstNameLike.
public void testQueryByFirstNameLike() {
UserQuery query = identityService.createUserQuery().userFirstNameLike("%\\%%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("kermit", query.singleResult().getId());
query = identityService.createUserQuery().userFirstNameLike("%\\_%");
assertEquals(1, query.list().size());
assertEquals(1, query.count());
assertEquals("fozzie", query.singleResult().getId());
}
Aggregations