Search in sources :

Example 1 with WithContextHierarchyAnnotation

use of cucumber.runtime.java.spring.contexthierarchyconfig.WithContextHierarchyAnnotation in project cucumber-jvm by cucumber.

the class SpringFactoryTest method shouldRespectContextHierarchyInStepDefs.

@Test
public void shouldRespectContextHierarchyInStepDefs() {
    final ObjectFactory factory = new SpringFactory();
    factory.addClass(WithContextHierarchyAnnotation.class);
    factory.start();
    WithContextHierarchyAnnotation stepdef = factory.getInstance(WithContextHierarchyAnnotation.class);
    factory.stop();
    assertNotNull(stepdef);
    assertTrue(stepdef.isAutowired());
}
Also used : ObjectFactory(cucumber.api.java.ObjectFactory) WithContextHierarchyAnnotation(cucumber.runtime.java.spring.contexthierarchyconfig.WithContextHierarchyAnnotation) Test(org.junit.Test)

Aggregations

ObjectFactory (cucumber.api.java.ObjectFactory)1 WithContextHierarchyAnnotation (cucumber.runtime.java.spring.contexthierarchyconfig.WithContextHierarchyAnnotation)1 Test (org.junit.Test)1