コード例 #1
0
 @Test
 public void testDelegate() throws Exception {
   mapper.setDelegate(
       new FieldSetMapper<String>() {
         @Override
         public String mapFieldSet(FieldSet fs) {
           return "foo";
         }
       });
   assertEquals("foo", mapper.mapFieldSet(new DefaultFieldSet(new String[] {"FOO"})).getItem());
 }
コード例 #2
0
 @Test
 public void testSetEndRecord() throws Exception {
   mapper.setEnd("FOO");
   assertTrue(mapper.mapFieldSet(new DefaultFieldSet(new String[] {"FOO"})).isFooter());
 }
コード例 #3
0
 @Test
 public void testDefaultEndRecord() throws Exception {
   assertFalse(mapper.mapFieldSet(new DefaultFieldSet(new String[] {"END"})).isHeader());
   assertTrue(mapper.mapFieldSet(new DefaultFieldSet(new String[] {"END"})).isFooter());
 }