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