Search in sources :

Example 1 with BdioTransformer

use of com.synopsys.integration.bdio.BdioTransformer in project synopsys-detect by blackducksoftware.

the class BdioAggregationTest method setup.

@BeforeAll
static void setup() throws IOException {
    gson = new Gson();
    bdioTransformer = new BdioTransformer();
    List<String> inputBdioFilenames = Arrays.asList("basic_multiproject_0_0_0_SNAPSHOT_com_synopsys_integration_basic_multiproject_0_0_0_SNAPSHOT_gradle_bom.jsonld", "basic_multiproject_0_0_0_SNAPSHOT_subprojectone_basic_multiproject_subprojectone_unspecified_gradle_bom.jsonld", "basic_multiproject_0_0_0_SNAPSHOT_subprojecttwo_basic_multiproject_subprojecttwo_unspecified_gradle_bom.jsonld");
    sourceDir = new File("src/test/resources/workflow/bdio/aggregation/src");
    inputCodelocations = readInputCodeLocations(inputBdioFilenames, sourceDir);
}
Also used : BdioTransformer(com.synopsys.integration.bdio.BdioTransformer) Gson(com.google.gson.Gson) File(java.io.File) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with BdioTransformer

use of com.synopsys.integration.bdio.BdioTransformer in project synopsys-detect by blackducksoftware.

the class DockerExtractorTest method getMockDockerExtractor.

private DockerExtractor getMockDockerExtractor(DetectableExecutableRunner executableRunner, FileFinder fileFinder) {
    BdioTransformer bdioTransformer = Mockito.mock(BdioTransformer.class);
    ExternalIdFactory externalIdFactory = Mockito.mock(ExternalIdFactory.class);
    Gson gson = new Gson();
    DockerInspectorResultsFileParser dockerInspectorResultsFileParser = Mockito.mock(DockerInspectorResultsFileParser.class);
    DockerInspectorResults dockerInspectorResults = new DockerInspectorResults("returnedimage", "returnedtag", "returned message");
    Mockito.when(dockerInspectorResultsFileParser.parse(Mockito.anyString())).thenReturn(Optional.of(dockerInspectorResults));
    ImageIdentifierGenerator imageIdentifierGenerator = new ImageIdentifierGenerator();
    return new DockerExtractor(fileFinder, executableRunner, bdioTransformer, externalIdFactory, gson, dockerInspectorResultsFileParser, imageIdentifierGenerator);
}
Also used : BdioTransformer(com.synopsys.integration.bdio.BdioTransformer) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) DockerInspectorResultsFileParser(com.synopsys.integration.detectable.detectables.docker.parser.DockerInspectorResultsFileParser) Gson(com.google.gson.Gson) DockerExtractor(com.synopsys.integration.detectable.detectables.docker.DockerExtractor) ImageIdentifierGenerator(com.synopsys.integration.detectable.detectables.docker.ImageIdentifierGenerator) DockerInspectorResults(com.synopsys.integration.detectable.detectables.docker.model.DockerInspectorResults)

Aggregations

Gson (com.google.gson.Gson)2 BdioTransformer (com.synopsys.integration.bdio.BdioTransformer)2 ExternalIdFactory (com.synopsys.integration.bdio.model.externalid.ExternalIdFactory)1 DockerExtractor (com.synopsys.integration.detectable.detectables.docker.DockerExtractor)1 ImageIdentifierGenerator (com.synopsys.integration.detectable.detectables.docker.ImageIdentifierGenerator)1 DockerInspectorResults (com.synopsys.integration.detectable.detectables.docker.model.DockerInspectorResults)1 DockerInspectorResultsFileParser (com.synopsys.integration.detectable.detectables.docker.parser.DockerInspectorResultsFileParser)1 File (java.io.File)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1