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);
}
Aggregations