Search in sources :

Example 11 with IntermediateStep

use of com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStep in project synopsys-detect by blackducksoftware.

the class IntermediateStepParseReplaceInEachLineTest method testRemoveTrailingJunk.

@Test
public void testRemoveTrailingJunk() throws IntegrationException, ExecutableFailedException {
    List<String> input = Arrays.asList("org_apache_commons_commons_io//jar:jar", "com_google_guava_guava//jar:jar");
    IntermediateStep intermediateStep = new IntermediateStepParseReplaceInEachLine("//.*", "");
    List<String> output = intermediateStep.process(input);
    assertEquals(2, output.size());
    assertEquals("org_apache_commons_commons_io", output.get(0));
    assertEquals("com_google_guava_guava", output.get(1));
}
Also used : IntermediateStepParseReplaceInEachLine(com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepParseReplaceInEachLine) IntermediateStep(com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStep) Test(org.junit.jupiter.api.Test)

Aggregations

IntermediateStep (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStep)11 Test (org.junit.jupiter.api.Test)11 IntermediateStepParseReplaceInEachLine (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepParseReplaceInEachLine)5 IntermediateStepParseFilterLines (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepParseFilterLines)3 ExecutableTarget (com.synopsys.integration.detectable.ExecutableTarget)1 DetectableExecutableRunner (com.synopsys.integration.detectable.detectable.executable.DetectableExecutableRunner)1 BazelCommandExecutor (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelCommandExecutor)1 BazelVariableSubstitutor (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.BazelVariableSubstitutor)1 IntermediateStepExecuteBazelOnEachLine (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepExecuteBazelOnEachLine)1 IntermediateStepParseSplitEach (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepParseSplitEach)1 IntermediateStepParseValuesFromXml (com.synopsys.integration.detectable.detectables.bazel.pipeline.step.IntermediateStepParseValuesFromXml)1 Executable (com.synopsys.integration.executable.Executable)1 ExecutableOutput (com.synopsys.integration.executable.ExecutableOutput)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1