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

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

There is a newer version: 1.3.1
Show newest version
package com.tngtech.jgiven.integration.spring;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

import com.tngtech.jgiven.junit.ScenarioTest;

/**
 * Base class for {@link SpringStageCreator} based JGiven tests.
 *
 * Needs to be used with the {@link org.springframework.test.context.junit4.SpringJUnit4ClassRunner}.
 * As a JUnit-rule based alternative, consider using {@link SpringRuleScenarioTest}.
 *
 * @param 
 * @param 
 * @param 
 *
 * @since 0.8.0
 */
public class SpringScenarioTest extends
        ScenarioTest implements BeanFactoryAware {

    @Override
    public void setBeanFactory( BeanFactory beanFactory ) {
        getScenario().setStageCreator( beanFactory.getBean( SpringStageCreator.class ) );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy