private void verifyStartParameterQueryInvocations() { Map<String, Date> startDateParameters = getCompleteStartDateQueryParameters(); verify(mockedQuery).startedBefore(startDateParameters.get("startedBefore")); verify(mockedQuery).startedAfter(startDateParameters.get("startedAfter")); verify(mockedQuery).list(); }
private void verifyStringStartParameterQueryInvocations() { Map<String, String> startDateParameters = getCompleteStartDateAsStringQueryParameters(); verify(mockedQuery).startedBefore(DateTimeUtil.parseDate(startDateParameters.get("startedBefore"))); verify(mockedQuery).startedAfter(DateTimeUtil.parseDate(startDateParameters.get("startedAfter"))); verify(mockedQuery).list(); }
query.startedAfter(startedAfter);
query.startedAfter(startedAfter);
assertEquals(1, historyService.createHistoricProcessInstanceQuery().startedBefore(hourFromNow.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedBefore(hourAgo.getTime()).count()); assertEquals(1, historyService.createHistoricProcessInstanceQuery().startedAfter(hourAgo.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedAfter(hourFromNow.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedAfter(hourFromNow.getTime()).startedBefore(hourAgo.getTime()).count());
query.startedAfter(startedAfter);
assertEquals(1, historyService.createHistoricProcessInstanceQuery().startedBefore(hourFromNow.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedBefore(hourAgo.getTime()).count()); assertEquals(1, historyService.createHistoricProcessInstanceQuery().startedAfter(hourAgo.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedAfter(hourFromNow.getTime()).count()); assertEquals(0, historyService.createHistoricProcessInstanceQuery().startedAfter(hourFromNow.getTime()).startedBefore(hourAgo.getTime()).count());