RESOLVED - issue BATCH-1642: test utility class to retrieve value from execution context

This commit is contained in:
dsyer
2010-10-28 15:49:20 +00:00
parent fcb82be654
commit a9cbc02e0b
2 changed files with 7 additions and 7 deletions

View File

@@ -34,11 +34,11 @@ import org.springframework.batch.item.ExecutionContext;
public class ExecutionContextTestUtils {
@SuppressWarnings("unchecked")
static <T> T getFromJob(JobExecution jobExecution, String key) {
static <T> T getValueFromJob(JobExecution jobExecution, String key) {
return (T) jobExecution.getExecutionContext().get(key);
}
static <T> T getFromStep(JobExecution jobExecution, String stepName, String key) {
static <T> T getValueFromStepInJob(JobExecution jobExecution, String stepName, String key) {
StepExecution stepExecution = null;
List<String> stepNames = new ArrayList<String>();
for (StepExecution candidate : jobExecution.getStepExecutions()) {
@@ -58,7 +58,7 @@ public class ExecutionContextTestUtils {
}
@SuppressWarnings("unchecked")
static <T> T getFromStep(StepExecution stepExecution, String key) {
static <T> T getValueFromStep(StepExecution stepExecution, String key) {
return (T) stepExecution.getExecutionContext().get(key);
}