com.tngtech.jgiven.integration.spring
Class SpringScenarioExecutor

java.lang.Object
  extended by com.tngtech.jgiven.impl.StandaloneScenarioExecutor
      extended by com.tngtech.jgiven.integration.spring.SpringScenarioExecutor
All Implemented Interfaces:
com.tngtech.jgiven.impl.ScenarioExecutor

public class SpringScenarioExecutor
extends com.tngtech.jgiven.impl.StandaloneScenarioExecutor
implements com.tngtech.jgiven.impl.ScenarioExecutor

Main class of JGiven for executing scenarios with spring support. See below on how to configure this bean.

Sample Configuration:

        @Bean
        @Scope("prototype")
        public SpringScenarioExecutor springScenarioExecutor() {
            return new SpringScenarioExecutor();
        }
 

The SpringScenarioExecutor is stateful, and thus should use "prototype" scope

Since:
0.8.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.tngtech.jgiven.impl.StandaloneScenarioExecutor
com.tngtech.jgiven.impl.StandaloneScenarioExecutor.StageState
 
Nested classes/interfaces inherited from interface com.tngtech.jgiven.impl.ScenarioExecutor
com.tngtech.jgiven.impl.ScenarioExecutor.State
 
Field Summary
 
Fields inherited from class com.tngtech.jgiven.impl.StandaloneScenarioExecutor
methodHandler, stackDepth, stages
 
Constructor Summary
SpringScenarioExecutor()
           
 
Method Summary
<T> T
createStageClass(java.lang.Class<T> stepsClass)
           
 com.tngtech.jgiven.impl.StandaloneScenarioExecutor.StageState getStageState(java.lang.Object stage)
           
 
Methods inherited from class com.tngtech.jgiven.impl.StandaloneScenarioExecutor
addIntroWord, addStage, failed, failIfPass, finished, getFailedException, hasFailed, injectSteps, readScenarioState, setFailedException, setListener, startScenario, startScenario, wireSteps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tngtech.jgiven.impl.ScenarioExecutor
addIntroWord, addStage, failed, failIfPass, finished, getFailedException, hasFailed, injectSteps, readScenarioState, setFailedException, setListener, startScenario, startScenario, wireSteps
 

Constructor Detail

SpringScenarioExecutor

public SpringScenarioExecutor()
Method Detail

createStageClass

public <T> T createStageClass(java.lang.Class<T> stepsClass)
Specified by:
createStageClass in interface com.tngtech.jgiven.impl.ScenarioExecutor
Overrides:
createStageClass in class com.tngtech.jgiven.impl.StandaloneScenarioExecutor

getStageState

public com.tngtech.jgiven.impl.StandaloneScenarioExecutor.StageState getStageState(java.lang.Object stage)
Overrides:
getStageState in class com.tngtech.jgiven.impl.StandaloneScenarioExecutor