use of io.cucumber.spring.contexthierarchyconfig.WithContextHierarchyAnnotation in project cucumber-jvm by cucumber.
the class SpringFactoryTest method shouldRespectContextHierarchyInStepDefs.
@Test
void shouldRespectContextHierarchyInStepDefs() {
final ObjectFactory factory = new SpringFactory();
factory.addClass(WithContextHierarchyAnnotation.class);
factory.start();
WithContextHierarchyAnnotation stepdef = factory.getInstance(WithContextHierarchyAnnotation.class);
factory.stop();
assertThat(stepdef, is(notNullValue()));
assertTrue(stepdef.isAutowired());
}
Aggregations