Search in sources :

Example 6 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class MultiTenancyDeploymentQueryTest method testQueryByNonExistingTenantId.

public void testQueryByNonExistingTenantId() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().tenantIdIn("nonExisting");
    assertThat(query.count(), is(0L));
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 7 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class MultiTenancyDeploymentQueryTest method testQueryAuthenticatedTenants.

public void testQueryAuthenticatedTenants() {
    identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    assertThat(query.count(), is(3L));
    assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
    assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
    assertThat(query.withoutTenantId().count(), is(1L));
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 8 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class MultiTenancyDeploymentQueryTest method testQueryNoAuthenticatedTenants.

public void testQueryNoAuthenticatedTenants() {
    identityService.setAuthentication("user", null, null);
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    assertThat(query.count(), is(1L));
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 9 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class MultiTenancyDeploymentQueryTest method testQueryNoTenantIdSet.

public void testQueryNoTenantIdSet() {
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    assertThat(query.count(), is(3L));
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 10 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class MultiTenancyDeploymentQueryTest method testQueryWithoutTenantId.

public void testQueryWithoutTenantId() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().withoutTenantId();
    assertThat(query.count(), is(1L));
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Aggregations

DeploymentQuery (org.camunda.bpm.engine.repository.DeploymentQuery)58 ProcessApplicationDeployment (org.camunda.bpm.engine.repository.ProcessApplicationDeployment)13 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)13 Deployment (org.camunda.bpm.engine.repository.Deployment)11 ProcessDefinitionQuery (org.camunda.bpm.engine.repository.ProcessDefinitionQuery)8 Test (org.junit.Test)7 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)5 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)4