use of org.jbehave.core.steps.InjectableStepsFactory in project jbehave-core by jbehave.
the class NeedleStepsFactoryBehaviour method stepsShouldBeCreated.
@Test
public void stepsShouldBeCreated() throws NoSuchFieldException, IllegalAccessException {
// Given
final InjectableStepsFactory factory = new NeedleStepsFactory(new MostUsefulConfiguration(), FooSteps.class);
// When
List<CandidateSteps> steps = factory.createCandidateSteps();
// Then
assertThat(steps.size(), equalTo(1));
boolean actual1 = steps.get(0) instanceof CandidateSteps;
assertThat(actual1, is(true));
Object instance = stepsInstance(steps.get(0));
boolean actual = instance instanceof FooSteps;
assertThat(actual, is(true));
}
Aggregations