Search in sources :

Example 6 with TaskStatusReport

use of pro.taskana.impl.report.impl.TaskStatusReport in project taskana by Taskana.

the class ProvideTaskStatusReportAccTest method testCompleteTaskStatusReportWithDomainFilter.

@Test
public void testCompleteTaskStatusReportWithDomainFilter() {
    // given
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    // when
    TaskStatusReport report = taskMonitorService.getTaskStatusReport(asList("DOMAIN_C", "DOMAIN_A"));
    // then
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report));
    }
    assertNotNull(report);
    assertEquals(2, report.rowSize());
    ReportRow<TaskQueryItem> row1 = report.getRow("DOMAIN_A");
    assertArrayEquals(new int[] { 22, 4, 0 }, row1.getCells());
    assertEquals(26, row1.getTotalValue());
    ReportRow<TaskQueryItem> row2 = report.getRow("DOMAIN_C");
    assertArrayEquals(new int[] { 10, 2, 0 }, row2.getCells());
    assertEquals(12, row2.getTotalValue());
    ReportRow<TaskQueryItem> sumRow = report.getSumRow();
    assertArrayEquals(new int[] { 32, 6, 0 }, sumRow.getCells());
    assertEquals(38, sumRow.getTotalValue());
}
Also used : TaskQueryItem(pro.taskana.impl.report.impl.TaskQueryItem) TaskMonitorService(pro.taskana.TaskMonitorService) TaskStatusReport(pro.taskana.impl.report.impl.TaskStatusReport) Test(org.junit.Test) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)

Aggregations

TaskQueryItem (pro.taskana.impl.report.impl.TaskQueryItem)6 TaskStatusReport (pro.taskana.impl.report.impl.TaskStatusReport)6 Test (org.junit.Test)5 TaskMonitorService (pro.taskana.TaskMonitorService)3 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)3 InOrder (org.mockito.InOrder)2