RESOLVED - issue BATCH-393: DefaultFieldSet should not always trim whitespace from the value returned
http://jira.springframework.org/browse/BATCH-393 added readRawString(int) and readRawString(String) methods to FieldSet interface
This commit is contained in:
@@ -441,4 +441,13 @@ public class FieldSetTests extends TestCase {
|
||||
long value = fs.readLong(0);
|
||||
assertEquals(value, 9);
|
||||
}
|
||||
|
||||
public void testReadRawString() {
|
||||
String name = "fieldName";
|
||||
String value = " string with trailing whitespace ";
|
||||
FieldSet fs = new DefaultFieldSet(new String[] { value }, new String[]{ name });
|
||||
|
||||
assertEquals(value, fs.readRawString(0));
|
||||
assertEquals(value, fs.readRawString(name));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user