IN PROGRESS - BATCH-571: Remove reference to Step from StepExecution

step reference replaced with stepName string
This commit is contained in:
robokaso
2008-04-28 11:41:31 +00:00
parent 8b8c65ae50
commit 6ca877c1d9
23 changed files with 110 additions and 111 deletions

View File

@@ -7,7 +7,6 @@ import org.springframework.batch.core.StepExecution;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.sample.item.writer.StagingItemWriter;
import org.springframework.batch.sample.tasklet.JobSupport;
import org.springframework.batch.sample.tasklet.StepSupport;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
import org.springframework.util.ClassUtils;
@@ -32,12 +31,13 @@ public class StagingItemReaderTests extends AbstractTransactionalDataSourceSprin
"staging-test-context.xml") };
}
/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.springframework.test.AbstractTransactionalSpringContextTests#onSetUpBeforeTransaction()
*/
protected void onSetUpBeforeTransaction() throws Exception {
StepExecution stepExecution = new StepExecution(new StepSupport("stepName"),
new JobExecution(new JobInstance(jobId, new JobParameters(), new JobSupport("testJob"))));
StepExecution stepExecution = new StepExecution("stepName", new JobExecution(new JobInstance(jobId,
new JobParameters(), new JobSupport("testJob"))));
reader.beforeStep(stepExecution);
writer.beforeStep(stepExecution);
}

View File

@@ -20,7 +20,6 @@ import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.sample.tasklet.JobSupport;
import org.springframework.batch.sample.tasklet.StepSupport;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
import org.springframework.util.ClassUtils;
@@ -37,12 +36,13 @@ public class StagingItemWriterTests extends AbstractTransactionalDataSourceSprin
"staging-test-context.xml") };
}
/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.springframework.test.AbstractTransactionalSpringContextTests#onSetUpBeforeTransaction()
*/
protected void onSetUpBeforeTransaction() throws Exception {
StepExecution stepExecution = new StepExecution(new StepSupport("stepName"),
new JobExecution(new JobInstance(new Long(12L), new JobParameters(), new JobSupport("testJob"))));
StepExecution stepExecution = new StepExecution("stepName", new JobExecution(new JobInstance(new Long(12L),
new JobParameters(), new JobSupport("testJob"))));
writer.beforeStep(stepExecution);
}