Beispiel #1
0
        private HistoricTaskInstanceReport setUpMockReportQuery()
        {
            HistoricTaskInstanceReport mockedReportQuery = mock(typeof(HistoricTaskInstanceReport));

            IList <HistoricTaskInstanceReportResult> taskReportResults            = createMockHistoricTaskInstanceReport();
            IList <HistoricTaskInstanceReportResult> taskReportResultsWithProcDef = createMockHistoricTaskInstanceReportWithProcDef();

            when(mockedReportQuery.completedAfter(any(typeof(DateTime)))).thenReturn(mockedReportQuery);
            when(mockedReportQuery.completedBefore(any(typeof(DateTime)))).thenReturn(mockedReportQuery);

            when(mockedReportQuery.countByTaskName()).thenReturn(taskReportResults);
            when(mockedReportQuery.countByProcessDefinitionKey()).thenReturn(taskReportResultsWithProcDef);

            IList <DurationReportResult> durationReportByMonth = createMockHistoricTaskInstanceDurationReport(MONTH);

            when(mockedReportQuery.duration(MONTH)).thenReturn(durationReportByMonth);

            IList <DurationReportResult> durationReportByQuarter = createMockHistoricTaskInstanceDurationReport(QUARTER);

            when(mockedReportQuery.duration(QUARTER)).thenReturn(durationReportByQuarter);

            when(processEngine.HistoryService.createHistoricTaskInstanceReport()).thenReturn(mockedReportQuery);

            return(mockedReportQuery);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUpRuntimeData()
        public virtual void setUpRuntimeData()
        {
            mockedReportQuery = setUpMockReportQuery();
        }