use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceQueryTest method testQueryByTenantIds.
public void testQueryByTenantIds() {
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceQueryTest method testQueryNoAuthenticatedTenants.
public void testQueryNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery();
assertThat(query.count(), is(0L));
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceQueryTest method testQueryAuthenticatedTenant.
public void testQueryAuthenticatedTenant() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery();
assertThat(query.count(), is(1L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(0L));
assertThat(query.tenantIdIn(TENANT_ONE, TENANT_TWO).count(), is(1L));
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceQueryTest method testQueryByNonExistingTenantId.
public void testQueryByNonExistingTenantId() {
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().tenantIdIn("nonExisting");
assertThat(query.count(), is(0L));
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceQueryTest method testQueryDisabledTenantCheck.
public void testQueryDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery();
assertThat(query.count(), is(2L));
}
Aggregations