RunnerReportServiceImpl implements RunnerReportService { @Override public String getReport(SimulationRunMetadata scenarioRunMetadata, ScenarioSimulationModel.Type modelType) { return scenarioCsvDownloadReport.getReport(scenarioRunMetadata, modelType); }  @Override String getReport(SimulationRunMetadata scenarioRunMetadata, ScenarioSimulationModel.Type modelType);  }
@Test public void getReportRULE() { AuditLog auditLog = new AuditLog(); IntStream.range(0, 6).forEach(index -> auditLog.addAuditLogLine(getAuditLogLine())); String report = runnerReportServiceImpl.getReport(getSimulationRunMetadata(auditLog), ScenarioSimulationModel.Type.RULE); assertNotNull(report); assertFalse(report.isEmpty()); String[] reportLine = report.split("\\r\\n"); assertTrue(report.contains("RULE")); assertFalse(report.contains("DECISION")); assertEquals(7 + auditLog.getAuditLogLines().size(), reportLine.length); for (int i = 0; i < reportLine.length; i++) { assertNotNull(reportLine[i]); } }
@Test public void getReportDMN() { AuditLog auditLog = new AuditLog(); IntStream.range(0, 6).forEach(index -> auditLog.addAuditLogLine(getAuditLogLine())); String report = runnerReportServiceImpl.getReport(getSimulationRunMetadata(auditLog), ScenarioSimulationModel.Type.DMN); assertNotNull(report); assertFalse(report.isEmpty()); String[] reportLine = report.split("\\r\\n"); assertTrue(report.contains("DECISION")); assertFalse(report.contains("RULE")); assertEquals(7 + auditLog.getAuditLogLines().size(), reportLine.length); for (int i = 0; i < reportLine.length; i++) { assertNotNull(reportLine[i]); } }