use of cucumber.runtime.java.spring.contextconfig.WithSpringAnnotations in project cucumber-jvm by cucumber.
the class SpringFactoryTest method shouldRespectCommonAnnotationsInStepDefs.
@Test
public void shouldRespectCommonAnnotationsInStepDefs() {
final ObjectFactory factory = new SpringFactory();
factory.addClass(WithSpringAnnotations.class);
factory.start();
WithSpringAnnotations stepdef = factory.getInstance(WithSpringAnnotations.class);
factory.stop();
assertNotNull(stepdef);
assertTrue(stepdef.isAutowired());
}
use of cucumber.runtime.java.spring.contextconfig.WithSpringAnnotations in project cucumber-jvm by cucumber.
the class SpringFactoryTest method shouldRespectCustomPropertyPlaceholderConfigurer.
@Test
public void shouldRespectCustomPropertyPlaceholderConfigurer() {
final ObjectFactory factory = new SpringFactory();
factory.addClass(WithSpringAnnotations.class);
factory.start();
WithSpringAnnotations stepdef = factory.getInstance(WithSpringAnnotations.class);
factory.stop();
assertEquals("property value", stepdef.getProperty());
}
Aggregations