com.tngtech.jgiven.integration.spring.SimpleSpringScenarioTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jgiven-spring-junit4 Show documentation
Show all versions of jgiven-spring-junit4 Show documentation
Module for using Spring dependency injection together with JGiven and JUnit 4
package com.tngtech.jgiven.integration.spring;
import com.tngtech.jgiven.junit.SimpleScenarioTest;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
/**
* A variant of {@link com.tngtech.jgiven.integration.spring.SpringScenarioTest} works with a single
* stage type parameter instead of three.
*
* @param the stage class that contains the step definitions
*/
public class SimpleSpringScenarioTest extends SimpleScenarioTest implements BeanFactoryAware {
public void setBeanFactory( BeanFactory beanFactory ) {
getScenario().setStageCreator( beanFactory.getBean( SpringStageCreator.class ) );
}
}