All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tngtech.jgiven.integration.spring.JGivenSpringConfiguration Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
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