From 9f7056b73f92d6a0eb409794f22d6f1e03bb5714 Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Fri, 17 May 2019 12:11:29 +0200 Subject: [PATCH] Reuse getSteps from StepHelper in common step tests --- test/groovy/CommonStepsTest.groovy | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/groovy/CommonStepsTest.groovy b/test/groovy/CommonStepsTest.groovy index 2b5f1e426..d684c7c19 100644 --- a/test/groovy/CommonStepsTest.groovy +++ b/test/groovy/CommonStepsTest.groovy @@ -4,6 +4,7 @@ import static org.hamcrest.Matchers.equalTo import static org.hamcrest.Matchers.is import static org.junit.Assert.assertThat import static org.junit.Assert.fail +import static util.StepHelper.getSteps import java.io.File; import java.util.stream.Collectors @@ -242,11 +243,4 @@ public class CommonStepsTest extends BasePiperTest{ assertThat("Steps with call methods with return types other than void: ${stepsWithCallMethodsOtherThanVoid}", stepsWithCallMethodsOtherThanVoid, is(empty())) } - - private static getSteps() { - List steps = [] - new File('vars').traverse(type: FileType.FILES, maxDepth: 0) - { if(it.getName().endsWith('.groovy')) steps << (it =~ /vars[\\\/](.*)\.groovy/)[0][1] } - return steps - } }