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));
}
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));
}
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));
}
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));
}
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));
}
Aggregations