use of com.synopsys.integration.detectable.detectables.bazel.pipeline.Pipeline in project synopsys-detect by blackducksoftware.
the class PipelinesTest method doTest.
private List<Dependency> doTest(WorkspaceRule workspaceRule, List<String> expectedBazelCommandArgs, List<String> userProvidedCqueryAdditionalOptions, String input) throws IntegrationException, ExecutableFailedException {
BazelCommandExecutor bazelCommandExecutor = Mockito.mock(BazelCommandExecutor.class);
Mockito.when(bazelCommandExecutor.executeToString(expectedBazelCommandArgs)).thenReturn(Optional.of(input));
BazelVariableSubstitutor bazelVariableSubstitutor = new BazelVariableSubstitutor("/:testTarget", userProvidedCqueryAdditionalOptions);
ExternalIdFactory externalIdFactory = new ExternalIdFactory();
HaskellCabalLibraryJsonProtoParser haskellCabalLibraryJsonProtoParser = new HaskellCabalLibraryJsonProtoParser(new Gson());
Pipelines pipelines = new Pipelines(bazelCommandExecutor, bazelVariableSubstitutor, externalIdFactory, haskellCabalLibraryJsonProtoParser);
Pipeline pipeline = pipelines.get(workspaceRule);
return pipeline.run();
}
Aggregations