| 1 | |
package org.jbehave.core.configuration.groovy; |
| 2 | |
|
| 3 | |
import java.net.URL; |
| 4 | |
import java.util.List; |
| 5 | |
|
| 6 | |
import org.jbehave.core.io.CodeLocations; |
| 7 | |
import org.jbehave.core.io.StoryFinder; |
| 8 | |
|
| 9 | |
public class GroovyResourceFinder { |
| 10 | |
|
| 11 | |
private URL codeLocation; |
| 12 | |
private String include; |
| 13 | |
private String exclude; |
| 14 | |
|
| 15 | |
public GroovyResourceFinder(){ |
| 16 | 0 | this(CodeLocations.codeLocationFromPath("src/main/groovy"), "**/*.groovy", ""); |
| 17 | 0 | } |
| 18 | |
|
| 19 | 3 | public GroovyResourceFinder(URL codeLocation, String include, String exclude) { |
| 20 | 3 | this.codeLocation = codeLocation; |
| 21 | 3 | this.include = include; |
| 22 | 3 | this.exclude = exclude; |
| 23 | 3 | } |
| 24 | |
|
| 25 | |
public List<String> findResources() { |
| 26 | 3 | return new StoryFinder().findPaths(codeLocation, include, exclude); |
| 27 | |
} |
| 28 | |
|
| 29 | |
} |