Search in sources :

Example 6 with FormattedOutput

use of com.synopsys.integration.detect.workflow.report.output.FormattedOutput 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

FormattedOutput (com.synopsys.integration.detect.workflow.report.output.FormattedOutput)6 File (java.io.File)5 Gson (com.google.gson.Gson)4 FormattedDetectorOutput (com.synopsys.integration.detect.workflow.report.output.FormattedDetectorOutput)4 FileNotFoundException (java.io.FileNotFoundException)4 FileReader (java.io.FileReader)4 FormattedOperationOutput (com.synopsys.integration.detect.workflow.report.output.FormattedOperationOutput)3 FormattedStatusOutput (com.synopsys.integration.detect.workflow.report.output.FormattedStatusOutput)3 NameVersion (com.synopsys.integration.util.NameVersion)3 Arrays (java.util.Arrays)3 Objects (java.util.Objects)3 Optional (java.util.Optional)3 Pattern (java.util.regex.Pattern)3 Assertions (org.junit.jupiter.api.Assertions)3 DetectInfo (com.synopsys.integration.detect.configuration.DetectInfo)1 DetectorToolResult (com.synopsys.integration.detect.tool.detector.DetectorToolResult)1 EventSystem (com.synopsys.integration.detect.workflow.event.EventSystem)1 FormattedOutputManager (com.synopsys.integration.detect.workflow.report.output.FormattedOutputManager)1 DetectableEnvironment (com.synopsys.integration.detectable.DetectableEnvironment)1 ExecutableNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.ExecutableNotFoundDetectableResult)1