use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class ScalaStepsFactoryBehaviour method shouldCreateStepsInstancesFromScalaWhenAnnotated.
@Test
public void shouldCreateStepsInstancesFromScalaWhenAnnotated() {
ScalaContext context = new ScalaContext("AnnotatedSteps", "NonAnnotatedSteps");
ScalaStepsFactory factory = new ScalaStepsFactory(new MostUsefulConfiguration(), context);
List<Class<?>> types = factory.stepsTypes();
MatcherAssert.assertThat(types.size(), Matchers.equalTo(1));
assertThat(types.get(0).getSimpleName(), equalTo("AnnotatedSteps"));
Object object = factory.createInstanceOfType(context.newInstance("AnnotatedSteps").getClass());
assertThat(object.getClass().getName(), equalTo("AnnotatedSteps"));
}
Aggregations