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