Class StepScopeTestUtils


  • public class StepScopeTestUtils
    extends java.lang.Object
    Utility class for creating and manipulating StepScope in unit tests. This is useful when you want to use the Spring test support and inject dependencies into your test case that happen to be step scoped in the application context.
    Author:
    Dave Syer
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> TdoInStepScope​(StepExecution stepExecution, java.util.concurrent.Callable<T> callable) 
      • Methods inherited from class java.lang.Object

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

      • StepScopeTestUtils

        public StepScopeTestUtils()
    • Method Detail

      • doInStepScope

        public static <T> T doInStepScope​(StepExecution stepExecution,
                                          java.util.concurrent.Callable<T> callable)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception