Class SpringStageCreator

  • All Implemented Interfaces:
    com.tngtech.jgiven.impl.StageCreator

    public class SpringStageCreator
    extends com.tngtech.jgiven.impl.DefaultStageCreator
    Main class of JGiven for executing scenarios with spring support. See below on how to configure this bean.

    Sample Configuration:

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

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

    Since:
    0.8.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T createStage​(java.lang.Class<T> stageClass, com.tngtech.jgiven.impl.intercept.StepInterceptor stepInterceptor)  
      • Methods inherited from class com.tngtech.jgiven.impl.DefaultStageCreator

        setStepInterceptor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringStageCreator

        public SpringStageCreator()
    • Method Detail

      • createStage

        public <T> T createStage​(java.lang.Class<T> stageClass,
                                 com.tngtech.jgiven.impl.intercept.StepInterceptor stepInterceptor)
        Specified by:
        createStage in interface com.tngtech.jgiven.impl.StageCreator
        Overrides:
        createStage in class com.tngtech.jgiven.impl.DefaultStageCreator