ScenarioResultMetadata { public void addAuditMessage(int messageIndex, String decisionOrRuleName, String result) { auditLogLines.add(new AuditLogLine(scenarioWithIndex.getIndex(), scenarioWithIndex.getScesimData().getDescription(), messageIndex, decisionOrRuleName, result)); } ScenarioResultMetadata(ScenarioWithIndex scenarioWithIndex); void addAvailable(String element); void addAllAvailable(Set<String> elements); void addExecuted(String element); void addAllExecuted(Map<String, Integer> elements); void addAuditMessage(int messageIndex, String decisionOrRuleName, String result); void addAuditMessage(int messageIndex, String decisionOrRuleName, String result, String message); void addAuditLogLines(List<AuditLogLine> toAdd); Set<String> getAvailable(); Set<String> getExecuted(); Map<String, Integer> getExecutedWithCounter(); List<AuditLogLine> getAuditLogLines(); ScenarioWithIndex getScenarioWithIndex();  }
@Test public void addAuditMessage() { assertTrue(scenarioResultMetadata.getAuditLogLines().isEmpty()); int index = 1; String decisionName = "decisionName"; String result = DMNDecisionResult.DecisionEvaluationStatus.SUCCEEDED.toString(); scenarioResultMetadata.addAuditMessage(index, decisionName, result); final List<AuditLogLine> retrieved = scenarioResultMetadata.getAuditLogLines(); assertEquals(1, retrieved.size()); commonCheckAuditLogLine(retrieved.get(0), decisionName, result, null); }