use of org.simpleflatmapper.csv.CsvWriter in project SimpleFlatMapper by arnaudroger.
the class CsvWriterTest method testWriterWithOneManualColumnWithFormat.
@Test
public void testWriterWithOneManualColumnWithFormat() throws Exception {
StringWriter sw = new StringWriter();
final CsvWriter.CsvWriterDSL<DbObject> dbObjectCsvWriterDSL = CsvWriter.from(DbObject.class).skipHeaders();
final CsvWriter<DbObject> to = dbObjectCsvWriterDSL.column("creation_time", new SimpleDateFormat("yyyyMMdd")).to(sw);
to.append(newDbObject());
assertEquals("20150606\r\n", sw.toString());
}
Aggregations