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

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

There is a newer version: 1.3.1
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy