Package org.springframework.batch.test
Class JobScopeTestUtils
- java.lang.Object
- org.springframework.batch.test.JobScopeTestUtils
public class JobScopeTestUtils extends java.lang.Object
Utility class for creating and manipulatingJobScope
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
Constructor Summary
Constructors Constructor Description JobScopeTestUtils()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
doInJobScope(JobExecution jobExecution, java.util.concurrent.Callable<T> callable)
Method Detail
doInJobScope
public static <T> T doInJobScope(JobExecution jobExecution, java.util.concurrent.Callable<T> callable) throws java.lang.Exception
- Throws:
java.lang.Exception