Search in sources :

Example 1 with FormattedStatusOutput

use of com.synopsys.integration.detect.workflow.report.output.FormattedStatusOutput in project synopsys-detect by blackducksoftware.

the class DockerAssertions method successfulToolStatusJson.

public void successfulToolStatusJson(String detectorType) {
    FormattedOutput statusJson = locateStatusJson();
    Optional<FormattedStatusOutput> tool = statusJson.status.stream().filter(it -> it.key.equals(detectorType)).findFirst();
    Assertions.assertTrue(tool.isPresent(), "Could not find required detector in status json detector list.");
    Assertions.assertEquals("SUCCESS", tool.get().status);
}
Also used : Arrays(java.util.Arrays) FormattedDetectorOutput(com.synopsys.integration.detect.workflow.report.output.FormattedDetectorOutput) FormattedOutput(com.synopsys.integration.detect.workflow.report.output.FormattedOutput) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) FormattedStatusOutput(com.synopsys.integration.detect.workflow.report.output.FormattedStatusOutput) Objects(java.util.Objects) NameVersion(com.synopsys.integration.util.NameVersion) FormattedOperationOutput(com.synopsys.integration.detect.workflow.report.output.FormattedOperationOutput) Gson(com.google.gson.Gson) Assertions(org.junit.jupiter.api.Assertions) Optional(java.util.Optional) FileReader(java.io.FileReader) Pattern(java.util.regex.Pattern) FormattedStatusOutput(com.synopsys.integration.detect.workflow.report.output.FormattedStatusOutput) FormattedOutput(com.synopsys.integration.detect.workflow.report.output.FormattedOutput)

Aggregations

Gson (com.google.gson.Gson)1 FormattedDetectorOutput (com.synopsys.integration.detect.workflow.report.output.FormattedDetectorOutput)1 FormattedOperationOutput (com.synopsys.integration.detect.workflow.report.output.FormattedOperationOutput)1 FormattedOutput (com.synopsys.integration.detect.workflow.report.output.FormattedOutput)1 FormattedStatusOutput (com.synopsys.integration.detect.workflow.report.output.FormattedStatusOutput)1 NameVersion (com.synopsys.integration.util.NameVersion)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 FileReader (java.io.FileReader)1 Arrays (java.util.Arrays)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 Pattern (java.util.regex.Pattern)1 Assertions (org.junit.jupiter.api.Assertions)1