Reuse getSteps from StepHelper in common step tests

This commit is contained in:
Marcus Holl
2019-05-17 12:11:29 +02:00
parent f83935d248
commit 9f7056b73f
+1 -7
View File
@@ -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
}
}