use of org.camunda.bpm.engine.runtime.EventSubscriptionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyEventSubscriptionQueryTest method testQueryNoAuthenticatedTenants.
public void testQueryNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery();
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.EventSubscriptionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyEventSubscriptionQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(1L));
query = runtimeService.createEventSubscriptionQuery().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.runtime.EventSubscriptionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyEventSubscriptionQueryTest method testQueryByTenantIdsIncludeSubscriptionsWithoutTenantId.
public void testQueryByTenantIdsIncludeSubscriptionsWithoutTenantId() {
EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery().tenantIdIn(TENANT_ONE).includeEventSubscriptionsWithoutTenantId();
assertThat(query.count(), is(2L));
query = runtimeService.createEventSubscriptionQuery().tenantIdIn(TENANT_TWO).includeEventSubscriptionsWithoutTenantId();
assertThat(query.count(), is(2L));
query = runtimeService.createEventSubscriptionQuery().tenantIdIn(TENANT_ONE, TENANT_TWO).includeEventSubscriptionsWithoutTenantId();
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.runtime.EventSubscriptionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyEventSubscriptionQueryTest method testQueryNoTenantIdSet.
public void testQueryNoTenantIdSet() {
EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery();
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.runtime.EventSubscriptionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyEventSubscriptionQueryTest method testQueryAuthenticatedTenants.
public void testQueryAuthenticatedTenants() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery();
assertThat(query.count(), is(3L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
}
Aggregations