IN PROGRESS - issue BATCH-340: Refactor JobRepository for greater clarity and consistency.

http://jira.springframework.org/browse/BATCH-340

JobInstance now has not-null Job as required constructor argument - repository no longer requires a separate Job setter
This commit is contained in:
robokaso
2008-02-25 13:50:53 +00:00
parent 1244264e50
commit 4e05642f98
24 changed files with 109 additions and 99 deletions

View File

@@ -3,6 +3,7 @@ package org.springframework.batch.sample.item.reader;
import org.springframework.batch.core.domain.JobExecution;
import org.springframework.batch.core.domain.JobInstance;
import org.springframework.batch.core.domain.JobParameters;
import org.springframework.batch.core.domain.JobSupport;
import org.springframework.batch.core.domain.StepExecution;
import org.springframework.batch.execution.scope.SimpleStepContext;
import org.springframework.batch.execution.scope.StepContext;
@@ -36,7 +37,7 @@ public class StagingItemReaderTests extends AbstractTransactionalDataSourceSprin
protected void prepareTestInstance() throws Exception {
StepContext stepScopeContext = new SimpleStepContext(new StepExecution("stepName",
new JobExecution(new JobInstance(jobId, new JobParameters()))));
new JobExecution(new JobInstance(jobId, new JobParameters(), new JobSupport("testJob")))));
StepSynchronizationManager.register(stepScopeContext);
RepeatSynchronizationManager.register(new RepeatContextSupport(null));
super.prepareTestInstance();