use of pro.taskana.impl.report.impl.ClassificationReport in project taskana by Taskana.
the class ProvideClassificationReportAccTest method testGetTotalNumbersOfTasksOfClassificationReport.
@Test
public void testGetTotalNumbersOfTasksOfClassificationReport() throws InvalidArgumentException {
TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
ClassificationReport report = taskMonitorService.getClassificationReport(null, null, null, null, null, null);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(reportToString(report));
}
assertNotNull(report);
assertEquals(5, report.rowSize());
assertEquals(10, report.getRow("L10000").getTotalValue());
assertEquals(10, report.getRow("L20000").getTotalValue());
assertEquals(7, report.getRow("L30000").getTotalValue());
assertEquals(10, report.getRow("L40000").getTotalValue());
assertEquals(13, report.getRow("L50000").getTotalValue());
assertEquals(0, report.getRow("L10000").getCells().length);
assertEquals(0, report.getRow("L20000").getCells().length);
assertEquals(0, report.getRow("L30000").getCells().length);
assertEquals(0, report.getRow("L40000").getCells().length);
assertEquals(0, report.getRow("L50000").getCells().length);
assertEquals(50, report.getSumRow().getTotalValue());
}
use of pro.taskana.impl.report.impl.ClassificationReport in project taskana by Taskana.
the class ProvideClassificationReportAccTest method testEachItemOfClassificationReport.
@Test
public void testEachItemOfClassificationReport() throws InvalidArgumentException {
TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
ClassificationReport report = taskMonitorService.getClassificationReport(null, null, null, null, null, null, columnHeaders);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(reportToString(report, columnHeaders));
}
assertNotNull(report);
assertEquals(5, report.rowSize());
int[] row1 = report.getRow("L10000").getCells();
assertArrayEquals(new int[] { 7, 2, 1, 0, 0 }, row1);
int[] row2 = report.getRow("L20000").getCells();
assertArrayEquals(new int[] { 5, 3, 1, 1, 0 }, row2);
int[] row3 = report.getRow("L30000").getCells();
assertArrayEquals(new int[] { 2, 1, 0, 1, 3 }, row3);
int[] row4 = report.getRow("L40000").getCells();
assertArrayEquals(new int[] { 2, 2, 2, 0, 4 }, row4);
int[] row5 = report.getRow("L50000").getCells();
assertArrayEquals(new int[] { 3, 3, 0, 5, 2 }, row5);
}
Aggregations