CSVReaderDataPool extends FileReaderDataPool { public CSVReaderDataPool(CSVDataPool configuration) { super(configuration); this.delimiter = configuration.getDelimiter().get(); } CSVReaderDataPool(CSVDataPool configuration); @Override void init(); @Override void close(); @Override void writeRow(DataPoolRow row); @Override Object postProcess(String line); Vector<String> getHeaders(String readOneLine); Vector<String> splitCSV(String readOneLine); @Override void doFirst_(); @Override void addRow(Object row); static final Logger logger; }
@Test public void testCSVReaderDataPool() { DataSet<?> pool = getDataPool("File.csv"); Assert.assertEquals("row12", ((SimpleStringMap)pool.next().getValue()).get("Col2").toString()); Assert.assertEquals("", ((SimpleStringMap)pool.next().getValue()).get("Col4").toString()); pool.close(); }