RESOLVED - issue BATCH-694: make line separator a configurable property of FlatFileItemWriter
This commit is contained in:
@@ -181,14 +181,21 @@ public class FlatFileItemWriterTests extends TestCase {
|
||||
*/
|
||||
public void testWriteRecord() throws Exception {
|
||||
String args = "1";
|
||||
|
||||
// AggregatorStub ignores the LineDescriptor, so we pass null
|
||||
writer.write(args);
|
||||
writer.flush();
|
||||
String lineFromFile = readLine();
|
||||
assertEquals(args, lineFromFile);
|
||||
}
|
||||
|
||||
public void testWriteRecordWithrecordSeparator() throws Exception {
|
||||
writer.setLineSeparator("|");
|
||||
writer.write("1");
|
||||
writer.write("2");
|
||||
writer.flush();
|
||||
String lineFromFile = readLine();
|
||||
assertEquals("1|2|", lineFromFile);
|
||||
}
|
||||
|
||||
public void testRollback() throws Exception {
|
||||
writer.write("testLine1");
|
||||
// rollback
|
||||
|
||||
Reference in New Issue
Block a user