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:
robokaso
2008-03-04 10:17:07 +00:00
parent 21fb94a079
commit c42a6ea147
3 changed files with 42 additions and 0 deletions

View File

@@ -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));
}
}