
com.tngtech.jgiven.integration.spring.JGivenSpringConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jgiven-spring Show documentation
Show all versions of jgiven-spring Show documentation
Module for using Spring dependency injection together with JGiven
package com.tngtech.jgiven.integration.spring;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Role;
import org.springframework.context.annotation.Scope;
/**
* {@code @Configuration} class that registers all beans an post-processors
* for full JGiven Spring support
*
* @since 0.9.4
*/
@Configuration
public class JGivenSpringConfiguration {
@Bean
@Scope( "prototype" )
public SpringStepMethodInterceptor springStepMethodInterceptor() {
return new SpringStepMethodInterceptor();
}
@Bean
@Scope( "prototype" )
public SpringScenarioExecutor springScenarioExecutor() {
return new SpringScenarioExecutor();
}
/*
* configure support for {@link JGivenStage} annotation
*/
@Bean
@Role( BeanDefinition.ROLE_INFRASTRUCTURE )
public JGivenStageAutoProxyCreator jGivenStageAutoProxyCreator() {
return new JGivenStageAutoProxyCreator();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy