private HistoricIdentityLinkLogQuery setUpMockHistoricIdentityLinkQuery(IList <HistoricIdentityLinkLog> mockedHistoricIdentityLinks) { HistoricIdentityLinkLogQuery mockedHistoricIdentityLinkQuery = mock(typeof(HistoricIdentityLinkLogQuery)); when(mockedHistoricIdentityLinkQuery.list()).thenReturn(mockedHistoricIdentityLinks); when(mockedHistoricIdentityLinkQuery.count()).thenReturn((long)mockedHistoricIdentityLinks.Count); when(processEngine.HistoryService.createHistoricIdentityLinkLogQuery()).thenReturn(mockedHistoricIdentityLinkQuery); return(mockedHistoricIdentityLinkQuery); }
public virtual CountResultDto getHistoricIdentityLinksCount(UriInfo uriInfo) { HistoricIdentityLinkLogQueryDto queryDto = new HistoricIdentityLinkLogQueryDto(objectMapper, uriInfo.QueryParameters); HistoricIdentityLinkLogQuery query = queryDto.toQuery(processEngine); long count = query.count(); CountResultDto result = new CountResultDto(); result.Count = count; return(result); }