Class JobScopeTestUtils


  • public class JobScopeTestUtils
    extends java.lang.Object
    Utility class for creating and manipulating JobScope 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 job scoped in the application context.
    Author:
    Dave Syer, Jimmy Praet
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> TdoInJobScope​(JobExecution jobExecution, 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

      • JobScopeTestUtils

        public JobScopeTestUtils()
    • Method Detail

      • doInJobScope

        public static <T> T doInJobScope​(JobExecution jobExecution,
                                         java.util.concurrent.Callable<T> callable)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception