Search in sources :

Example 16 with GroupQuery

use of org.camunda.bpm.engine.identity.GroupQuery in project camunda-bpm-platform by camunda.

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);
    query = identityService.createGroupQuery().groupNameLike("%ters\\_");
    verifyQueryResults(query, 1);
}
Also used : GroupQuery(org.camunda.bpm.engine.identity.GroupQuery)

Example 17 with GroupQuery

use of org.camunda.bpm.engine.identity.GroupQuery in project camunda-bpm-platform by camunda.

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 (ProcessEngineException e) {
    }
}
Also used : GroupQuery(org.camunda.bpm.engine.identity.GroupQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 18 with GroupQuery

use of org.camunda.bpm.engine.identity.GroupQuery in project camunda-bpm-platform by camunda.

the class GroupQueryTest method testQueryByInvalidType.

public void testQueryByInvalidType() {
    GroupQuery query = identityService.createGroupQuery().groupType("invalid");
    verifyQueryResults(query, 0);
    try {
        identityService.createGroupQuery().groupType(null).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : GroupQuery(org.camunda.bpm.engine.identity.GroupQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 19 with GroupQuery

use of org.camunda.bpm.engine.identity.GroupQuery in project camunda-bpm-platform by camunda.

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 (ProcessEngineException e) {
    }
}
Also used : GroupQuery(org.camunda.bpm.engine.identity.GroupQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 20 with GroupQuery

use of org.camunda.bpm.engine.identity.GroupQuery in project camunda-bpm-platform by camunda.

the class GroupQueryTest method testQueryByInvalidMember.

public void testQueryByInvalidMember() {
    GroupQuery query = identityService.createGroupQuery().groupMember("invalid");
    verifyQueryResults(query, 0);
    try {
        identityService.createGroupQuery().groupMember(null).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : GroupQuery(org.camunda.bpm.engine.identity.GroupQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Aggregations

GroupQuery (org.camunda.bpm.engine.identity.GroupQuery)34 Group (org.camunda.bpm.engine.identity.Group)22 Test (org.junit.Test)12 Matchers.anyString (org.mockito.Matchers.anyString)10 ArrayList (java.util.ArrayList)6 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)5 User (org.camunda.bpm.engine.identity.User)5 UserQuery (org.camunda.bpm.engine.identity.UserQuery)4 Authentication (org.camunda.bpm.engine.impl.identity.Authentication)4 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)3 Tenant (org.camunda.bpm.engine.identity.Tenant)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 Response (com.jayway.restassured.response.Response)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 AuthorizationException (org.camunda.bpm.engine.AuthorizationException)1 IdentityService (org.camunda.bpm.engine.IdentityService)1 RepositoryService (org.camunda.bpm.engine.RepositoryService)1