@Test public void testRead() throws IOException { final String[] header = listReader.getHeader(true); assertArrayEquals(HEADER, header); final List<List<String>> customers = new ArrayList<List<String>>(); List<String> customer; while( (customer = listReader.read()) != null ) { customers.add(customer); } for( int i = 0; i < customers.size(); i++ ) { customer = customers.get(i); assertEquals(STRING_CUSTOMERS.get(i).getCustomerNo(), customer.get(0)); assertEquals(STRING_CUSTOMERS.get(i).getFirstName(), customer.get(1)); assertEquals(STRING_CUSTOMERS.get(i).getLastName(), customer.get(2)); assertEquals(STRING_CUSTOMERS.get(i).getBirthDate(), customer.get(3)); assertEquals(STRING_CUSTOMERS.get(i).getBirthTime().toString(), customer.get(4).toString()); assertEquals(STRING_CUSTOMERS.get(i).getMailingAddress(), customer.get(5)); assertEquals(STRING_CUSTOMERS.get(i).getMarried(), customer.get(6)); assertEquals(STRING_CUSTOMERS.get(i).getNumberOfKids(), customer.get(7)); assertEquals(STRING_CUSTOMERS.get(i).getFavouriteQuote(), customer.get(8)); assertEquals(STRING_CUSTOMERS.get(i).getEmail(), customer.get(9)); assertEquals(STRING_CUSTOMERS.get(i).getLoyaltyPoints(), customer.get(10)); } assertEquals(STRING_CUSTOMERS.size() + 1, listReader.getRowNumber()); }
public List<String> read() throws IOException { if( readRow() ) { return new ArrayList<String>(getColumns()); } return null; }
CsvListReader extends AbstractCsvReader implements ICsvListReader { public List<String> read() throws IOException { if( readRow() ) { return new ArrayList<String>(getColumns()); } return null; } }
CsvListReader extends AbstractCsvReader implements ICsvListReader { public List<String> read() throws IOException { if( readRow() ) { return new ArrayList<String>(getColumns()); } return null; } CsvListReader(final Reader reader, final CsvPreference preferences);  CsvListReader(final ITokenizer tokenizer, final CsvPreference preferences); }
CsvListReader extends AbstractCsvReader implements ICsvListReader { public List<String> read() throws IOException { if( readRow() ) { return new ArrayList<String>(getColumns()); } return null; } CsvListReader(final Reader reader, final CsvPreference preferences);  CsvListReader(final ITokenizer tokenizer, final CsvPreference preferences); List<String> read(); List<Object> read(final CellProcessor... processors); List<Object> executeProcessors(final CellProcessor... processors); }
CsvListReader extends AbstractCsvReader implements ICsvListReader { public List<String> read() throws IOException { if( readRow() ) { return new ArrayList<String>(getColumns()); } return null; } CsvListReader(final Reader reader, final CsvPreference preferences);  CsvListReader(final ITokenizer tokenizer, final CsvPreference preferences); List<String> read(); List<Object> read(final CellProcessor... processors); List<Object> executeProcessors(final CellProcessor... processors);  }