com.tngtech.jgiven.integration.spring.SimpleSpringRuleScenarioTest 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.impl.Scenario;
import com.tngtech.jgiven.junit.JGivenMethodRule;
import com.tngtech.jgiven.junit.JGivenClassRule;
import org.junit.ClassRule;
import org.junit.Rule;
/**
* A variant of {@link SpringRuleScenarioTest} works with a single
* stage type parameter instead of three.
*
* @param the stage class that contains the step definitions
*
* @since 0.13.0
*/
public class SimpleSpringRuleScenarioTest extends InternalSimpleSpringScenarioTest {
@ClassRule
public static final JGivenClassRule writerRule = new JGivenClassRule();
@Rule
public final JGivenMethodRule scenarioRule = new JGivenMethodRule( createScenario() );
@Override
public Scenario getScenario() {
return (Scenario) scenarioRule.getScenario();
}
}