use of org.jbehave.core.steps.needle.ValueGetter in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldSupplyInjectors.
@Test
public void shouldSupplyInjectors() {
final NeedleAnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(AnnotatedWithStepsWithDependency.class);
final List<CandidateSteps> buildCandidateSteps = builderAnnotated.buildCandidateSteps();
assertThatStepsInstancesAre(buildCandidateSteps, FooStepsWithDependency.class);
final ValueGetter getter = ((FooStepsWithDependency) ((Steps) buildCandidateSteps.get(0)).instance()).getGetter();
assertThat(getter, is(notNullValue()));
assertThat((String) getter.getValue(), is(ValueGetter.VALUE));
}
Aggregations