use of org.jbehave.core.configuration.groovy.GroovyResourceFinder in project jbehave-core by jbehave.
the class GroovyStepsFactoryBehaviour method shouldCreateStepsInstancesFromGroovyWhenAnnotated.
@Test
public void shouldCreateStepsInstancesFromGroovyWhenAnnotated() {
GroovyResourceFinder resourceFinder = new GroovyResourceFinder(codeLocationFromClass(this.getClass()), "**/steps/groovy/*.groovy", "**/invalidSteps.groovy");
GroovyStepsFactory factory = new GroovyStepsFactory(new MostUsefulConfiguration(), new GroovyContext(resourceFinder));
List<Class<?>> types = factory.stepsTypes();
MatcherAssert.assertThat(types.size(), Matchers.equalTo(1));
assertThat(types.get(0).getSimpleName(), equalTo("AnnotatedSteps"));
}
Aggregations