Search in sources :

Example 1 with Pipeline

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();
}
Also used : Pipelines(com.synopsys.integration.detectable.detectables.bazel.pipeline.Pipelines) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) BazelVariableSubstitutor(com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelVariableSubstitutor) Gson(com.google.gson.Gson) HaskellCabalLibraryJsonProtoParser(com.synopsys.integration.detectable.detectables.bazel.pipeline.step.HaskellCabalLibraryJsonProtoParser) BazelCommandExecutor(com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelCommandExecutor) Pipeline(com.synopsys.integration.detectable.detectables.bazel.pipeline.Pipeline)

Aggregations

Gson (com.google.gson.Gson)1 ExternalIdFactory (com.synopsys.integration.bdio.model.externalid.ExternalIdFactory)1 Pipeline (com.synopsys.integration.detectable.detectables.bazel.pipeline.Pipeline)1 Pipelines (com.synopsys.integration.detectable.detectables.bazel.pipeline.Pipelines)1 BazelCommandExecutor (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelCommandExecutor)1 BazelVariableSubstitutor (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelVariableSubstitutor)1 HaskellCabalLibraryJsonProtoParser (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.HaskellCabalLibraryJsonProtoParser)1