com.tngtech.jgiven.integration.spring.SpringRuleScenarioTest 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 org.junit.ClassRule;
import org.junit.Rule;
import com.tngtech.jgiven.impl.Scenario;
import com.tngtech.jgiven.junit.JGivenMethodRule;
import com.tngtech.jgiven.junit.JGivenClassRule;
/**
* Base class for {@link SpringStageCreator} based JGiven tests
*
* Uses JUnit rules (introduced in Spring 4.2) instead of a JUnit runner in
* order to allow custom JUnit runners.
*
*
* @param
* @param
* @param
*
* @since 0.13.0
*/
public class SpringRuleScenarioTest extends InternalSpringScenarioTest {
@ClassRule
public static final JGivenClassRule writerRule = new JGivenClassRule();
@Rule
public final JGivenMethodRule scenarioRule = new JGivenMethodRule( createScenario() );
@Override
public Scenario getScenario() {
return (Scenario) scenarioRule.getScenario();
}
}