Search in sources :

Example 11 with DetailedMonitorQueryItem

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

the class ProvideDetailedClassificationReportAccTest method testEachItemOfDetailedClassificationReportNotInWorkingDays.

@Test
public void testEachItemOfDetailedClassificationReportNotInWorkingDays() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    DetailedClassificationReport report = taskMonitorService.getDetailedClassificationReport(null, null, null, null, null, null, columnHeaders, false);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(5, report.rowSize());
    DetailedReportRow line1 = report.getRow("L10000");
    assertArrayEquals(new int[] { 9, 0, 1, 0, 0 }, line1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine1 = line1.getDetailRows().get("L11000");
    assertArrayEquals(new int[] { 2, 0, 1, 0, 0 }, detailedLine1.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment1 = line1.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 7, 0, 0, 0, 0 }, detailedLineNoAttachment1.getCells());
    DetailedReportRow line2 = report.getRow("L20000");
    assertArrayEquals(new int[] { 8, 0, 1, 0, 1 }, line2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine2 = line2.getDetailRows().get("L22000");
    assertArrayEquals(new int[] { 2, 0, 1, 0, 1 }, detailedLine2.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment2 = line2.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 6, 0, 0, 0, 0 }, detailedLineNoAttachment2.getCells());
    DetailedReportRow line3 = report.getRow("L30000");
    assertArrayEquals(new int[] { 3, 0, 0, 0, 4 }, line3.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3a = line3.getDetailRows().get("L33000");
    assertArrayEquals(new int[] { 1, 0, 0, 0, 2 }, detailedLine3a.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLine3b = line3.getDetailRows().get("L99000");
    assertArrayEquals(new int[] { 0, 0, 0, 0, 1 }, detailedLine3b.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment3 = line3.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 2, 0, 0, 0, 1 }, detailedLineNoAttachment3.getCells());
    DetailedReportRow line4 = report.getRow("L40000");
    assertArrayEquals(new int[] { 4, 0, 2, 0, 4 }, line4.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment4 = line4.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 4, 0, 2, 0, 4 }, detailedLineNoAttachment4.getCells());
    DetailedReportRow line5 = report.getRow("L50000");
    assertArrayEquals(new int[] { 6, 0, 0, 0, 7 }, line5.getCells());
    ReportRow<DetailedMonitorQueryItem> detailedLineNoAttachment5 = line5.getDetailRows().get("N/A");
    assertArrayEquals(new int[] { 6, 0, 0, 0, 7 }, detailedLineNoAttachment5.getCells());
}
Also used : TaskMonitorService(pro.taskana.TaskMonitorService) DetailedClassificationReport(pro.taskana.impl.report.impl.DetailedClassificationReport) DetailedMonitorQueryItem(pro.taskana.impl.report.impl.DetailedMonitorQueryItem) DetailedReportRow(pro.taskana.impl.report.impl.DetailedReportRow) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Aggregations

DetailedMonitorQueryItem (pro.taskana.impl.report.impl.DetailedMonitorQueryItem)11 DetailedClassificationReport (pro.taskana.impl.report.impl.DetailedClassificationReport)10 Test (org.junit.Test)9 DetailedReportRow (pro.taskana.impl.report.impl.DetailedReportRow)9 TimeIntervalColumnHeader (pro.taskana.impl.report.impl.TimeIntervalColumnHeader)9 TaskMonitorService (pro.taskana.TaskMonitorService)7 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)7 CustomField (pro.taskana.CustomField)3 TaskState (pro.taskana.TaskState)3 ArrayList (java.util.ArrayList)2