Search in sources :

Example 1 with Severity

use of com.mercedesbenz.sechub.commons.model.Severity in project sechub by mercedes-benz.

the class ReportTrafficLightCalculatorTest method prepareSechubResultWithFindings.

/* +-----------------------------------------------------------------------+ */
/* +............................ Helpers ..................................+ */
/* +-----------------------------------------------------------------------+ */
private SecHubReportModel prepareSechubResultWithFindings(Severity... severities) {
    List<SecHubFinding> findingList = new ArrayList<>();
    for (Severity severity : severities) {
        SecHubFinding finding = new SecHubFinding();
        finding.setSeverity(severity);
        findingList.add(finding);
    }
    SecHubReportModel model = new SecHubReportModel();
    model.getResult().getFindings().addAll(findingList);
    return model;
}
Also used : SecHubReportModel(com.mercedesbenz.sechub.commons.model.SecHubReportModel) SecHubFinding(com.mercedesbenz.sechub.commons.model.SecHubFinding) ArrayList(java.util.ArrayList) Severity(com.mercedesbenz.sechub.commons.model.Severity)

Aggregations

SecHubFinding (com.mercedesbenz.sechub.commons.model.SecHubFinding)1 SecHubReportModel (com.mercedesbenz.sechub.commons.model.SecHubReportModel)1 Severity (com.mercedesbenz.sechub.commons.model.Severity)1 ArrayList (java.util.ArrayList)1