Coverage Report - org.jbehave.core.configuration.groovy.GroovyResourceFinder
 
Classes in this File Line Coverage Branch Coverage Complexity
GroovyResourceFinder
75%
6/8
N/A
1
 
 1  
 package org.jbehave.core.configuration.groovy;
 2  
 
 3  
 import static java.util.Arrays.asList;
 4  
 
 5  
 import java.net.URL;
 6  
 import java.util.List;
 7  
 
 8  
 import org.jbehave.core.io.CodeLocations;
 9  
 import org.jbehave.core.io.StoryFinder;
 10  
 
 11  
 public class GroovyResourceFinder {
 12  
 
 13  
     private URL codeLocation;
 14  
     private String include;
 15  
     private String exclude;
 16  
 
 17  
     public GroovyResourceFinder(){
 18  0
         this(CodeLocations.codeLocationFromPath("src/main/groovy"), "**/*.groovy", "");
 19  0
     }
 20  
 
 21  3
     public GroovyResourceFinder(URL codeLocation, String include, String exclude) {
 22  3
         this.codeLocation = codeLocation;
 23  3
         this.include = include;
 24  3
         this.exclude = exclude;
 25  3
     }
 26  
 
 27  
     public List<String> findResources() {
 28  3
         return new StoryFinder().findPaths(codeLocation.getFile(), asList(include), asList(exclude));
 29  
     }
 30  
 
 31  
 }