use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class ProcessEngineRestServiceTest method createHistoricExternalTaskLogMock.
private void createHistoricExternalTaskLogMock() {
HistoricExternalTaskLogQuery mockHistoricExternalTaskLogQuery = mock(HistoricExternalTaskLogQuery.class);
List<HistoricExternalTaskLog> historicExternalTaskLogs = MockProvider.createMockHistoricExternalTaskLogs();
when(mockHistoricExternalTaskLogQuery.list()).thenReturn(historicExternalTaskLogs);
when(mockHistoryService.createHistoricExternalTaskLogQuery()).thenReturn(mockHistoricExternalTaskLogQuery);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogRestServiceQueryTest method setUpMockHistoricExternalTaskLogQuery.
protected HistoricExternalTaskLogQuery setUpMockHistoricExternalTaskLogQuery(List<HistoricExternalTaskLog> mockedHistoricExternalTaskLogs) {
HistoricExternalTaskLogQuery mockedHistoricExternalTaskLogQuery = mock(HistoricExternalTaskLogQuery.class);
when(mockedHistoricExternalTaskLogQuery.list()).thenReturn(mockedHistoricExternalTaskLogs);
when(mockedHistoricExternalTaskLogQuery.count()).thenReturn((long) mockedHistoricExternalTaskLogs.size());
when(processEngine.getHistoryService().createHistoricExternalTaskLogQuery()).thenReturn(mockedHistoricExternalTaskLogQuery);
return mockedHistoricExternalTaskLogQuery;
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricExternalTaskLogTest method testQueryByTenantIds.
@Test
public void testQueryByTenantIds() {
// given two process with different tenants
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
// then
assertThat(query.count(), is(5L));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricExternalTaskLogTest method testQueryWithoutTenantId.
@Test
public void testQueryWithoutTenantId() {
// given two process with different tenants
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
assertThat(query.count(), is(5L));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testQueryWithoutAuthorization.
public void testQueryWithoutAuthorization() {
// given
startThreeProcessInstancesDeleteOneAndCompleteTwoWithFailure();
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 0);
}
Aggregations