Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }