Search in sources :

Example 1 with FormattedOperationOutput

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

the class DockerAssertions method successfulOperationStatusJson.

public void successfulOperationStatusJson(String operationKey) {
    FormattedOutput statusJson = locateStatusJson();
    Optional<FormattedOperationOutput> detector = statusJson.operations.stream().filter(it -> it.descriptionKey.equals(operationKey)).findFirst();
    Assertions.assertTrue(detector.isPresent(), "Could not find required operation '" + operationKey + "' in status json detector list.");
    Assertions.assertEquals("SUCCESS", detector.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) FormattedOperationOutput(com.synopsys.integration.detect.workflow.report.output.FormattedOperationOutput) 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