use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinition in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceStatisticsQueryTest method testQueryAuthenticatedTenant.
@Test
public void testQueryAuthenticatedTenant() {
DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().tenantIdIn(TENANT_ONE).singleResult();
identityService.setAuthentication(USER_ID, null, Arrays.asList(TENANT_ONE));
HistoricDecisionInstanceStatisticsQuery query = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.getId());
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinition in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceStatisticsQueryTest method testQueryNoAuthenticatedTenants.
@Test
public void testQueryNoAuthenticatedTenants() {
DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().tenantIdIn(TENANT_ONE).singleResult();
identityService.setAuthentication(USER_ID, null, null);
HistoricDecisionInstanceStatisticsQuery query = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.getId());
assertThat(query.count(), is(0L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinition in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricDecisionInstanceStatisticsQueryTest method testQueryDisabledTenantCheck.
@Test
public void testQueryDisabledTenantCheck() {
DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().tenantIdIn(TENANT_ONE).singleResult();
engineRule.getProcessEngineConfiguration().setTenantCheckEnabled(false);
identityService.setAuthentication(USER_ID, null, null);
HistoricDecisionInstanceStatisticsQuery query = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.getId());
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinition in project camunda-bpm-platform by camunda.
the class MultiTenancySharedDecisionInstanceStatisticsQueryTest method testQueryDisabledTenantCheck.
@Test
public void testQueryDisabledTenantCheck() {
DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().singleResult();
engineRule.getProcessEngineConfiguration().setTenantCheckEnabled(false);
identityService.setAuthentication(USER_ID, null, null);
HistoricDecisionInstanceStatisticsQuery query = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.getId());
assertThat(query.count(), is(3L));
}
use of org.camunda.bpm.engine.repository.DecisionRequirementsDefinition in project camunda-bpm-platform by camunda.
the class MultiTenancySharedDecisionInstanceStatisticsQueryTest method testQueryAuthenticatedTenant.
@Test
public void testQueryAuthenticatedTenant() {
DecisionRequirementsDefinition decisionRequirementsDefinition = repositoryService.createDecisionRequirementsDefinitionQuery().singleResult();
identityService.setAuthentication(USER_ID, null, Arrays.asList(TENANT_ONE));
HistoricDecisionInstanceStatisticsQuery query = historyService.createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinition.getId());
assertThat(query.count(), is(3L));
}
Aggregations