Search in sources :

Example 1 with ImageIdentifierGenerator

use of com.synopsys.integration.detectable.detectables.docker.ImageIdentifierGenerator 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)1 BdioTransformer (com.synopsys.integration.bdio.BdioTransformer)1 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