BATCH-493: Added saveState flag to FlatFileItemWriter and FlatFileItemReader.
This commit is contained in:
@@ -65,6 +65,7 @@ public class FlatFileItemReaderAdvancedTests extends TestCase {
|
||||
reader.setResource(getInputResource(TEST_STRING));
|
||||
reader.setLineTokenizer(tokenizer);
|
||||
reader.setFieldSetMapper(fieldSetMapper);
|
||||
reader.setSaveState(true);
|
||||
// context argument is necessary only for the FileLocator, which
|
||||
// is mocked
|
||||
executionContext = new ExecutionContext();
|
||||
|
||||
@@ -71,6 +71,7 @@ public class FlatFileItemWriterTests extends TestCase {
|
||||
inputSource.setResource(new FileSystemResource(outputFile));
|
||||
inputSource.setFieldSetCreator(new PassThroughFieldSetMapper());
|
||||
inputSource.afterPropertiesSet();
|
||||
inputSource.setSaveState(true);
|
||||
executionContext = new ExecutionContext();
|
||||
}
|
||||
|
||||
@@ -267,6 +268,7 @@ public class FlatFileItemWriterTests extends TestCase {
|
||||
inputSource.setResource(new FileSystemResource(outputFile));
|
||||
inputSource.setFieldSetCreator(new PassThroughFieldSetMapper());
|
||||
inputSource.afterPropertiesSet();
|
||||
inputSource.setSaveState(true);
|
||||
inputSource.open(executionContext);
|
||||
inputSource.update(executionContext);
|
||||
assertNotNull(executionContext);
|
||||
|
||||
Reference in New Issue
Block a user