public virtual void testQueryByTenantId() { HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_ONE); assertThat(query.count(), @is(2L)); query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_TWO); assertThat(query.count(), @is(2L)); }
public virtual void testQueryNoAuthenticatedTenants() { identityService.setAuthentication("user", null, null); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery(); assertThat(query.count(), @is(0L)); }
public virtual void testQueryDisabledTenantCheck() { processEngineConfiguration.TenantCheckEnabled = false; identityService.setAuthentication("user", null, null); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery(); assertThat(query.count(), @is(4L)); }
public virtual void testQueryAuthenticatedTenants() { identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO)); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery(); assertThat(query.count(), @is(4L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(2L)); }
protected internal virtual HistoricJobLogQuery setUpMockHistoricJobLogQuery(IList <HistoricJobLog> mockedHistoricJogLogs) { HistoricJobLogQuery mockedhistoricJobLogQuery = mock(typeof(HistoricJobLogQuery)); when(mockedhistoricJobLogQuery.list()).thenReturn(mockedHistoricJogLogs); when(mockedhistoricJobLogQuery.count()).thenReturn((long)mockedHistoricJogLogs.Count); when(processEngine.HistoryService.createHistoricJobLogQuery()).thenReturn(mockedhistoricJobLogQuery); return(mockedhistoricJobLogQuery); }
public virtual CountResultDto queryHistoricJobLogsCount(HistoricJobLogQueryDto queryDto) { queryDto.ObjectMapper = objectMapper; HistoricJobLogQuery query = queryDto.toQuery(processEngine); long count = query.count(); CountResultDto result = new CountResultDto(); result.Count = count; return(result); }
protected internal virtual void verifyQueryResults(HistoricJobLogQuery query, int countExpected) { assertEquals(countExpected, query.list().size()); assertEquals(countExpected, query.count()); if (countExpected == 1) { assertNotNull(query.singleResult()); } else if (countExpected > 1) { verifySingleResultFails(query); } else if (countExpected == 0) { assertNull(query.singleResult()); } }
public virtual void testQueryByNonExistingTenantId() { HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn("nonExisting"); assertThat(query.count(), @is(0L)); }
public virtual void testQueryWithoutTenantId() { HistoricJobLogQuery query = historyService.createHistoricJobLogQuery(); assertThat(query.count(), @is(4L)); }