@Test public void testParse() throws Throwable { String testFileName = "CSV_testdata_withHeader0.csv"; InputStream is; List<List<String>>actual; List<String> list; String expected; myLog.debug( "Testing No charset" ); is = ClassLoader.getSystemResourceAsStream( testFileName ); actual = myClassUnderTest.parse( is, ";", null ); myLog.debug( "Received: " + actual ); myLog.debug( "Testing plainvanilla" ); is = ClassLoader.getSystemResourceAsStream( testFileName ); actual = myClassUnderTest.parse( is, ";", "UTF-8"); myLog.debug( "Received: " + actual ); assertEquals( 3, actual.size() ); assertEquals( "[[Screenname, Name, Middlename, Prename, email, birthday, entrydate], [Bobby, Smith, C., Bob, bob@gmail.com, 7.3.57, 2005-05-23 17:30], [Sandy, Hübscher, , Sandra, sandra@lamp.vm, 09.12.98, 2007-06-13 07:12]]", actual.toString() ); myLog.debug( "Wrong charset" ); is = ClassLoader.getSystemResourceAsStream( testFileName ); actual = myClassUnderTest.parse( is, ";", "ISO-8859-1" ); myLog.debug( "Received: " + actual ); list = actual.get( 2 ); String wrongString = list.get( 1 ); expected = "H\u00c3\u00bcbscher"; assertEquals( expected, wrongString ); myLog.debug( "Wrong delimiter" ); is = ClassLoader.getSystemResourceAsStream( testFileName ); actual = myClassUnderTest.parse( is, " ", "UTF-8" ); myLog.debug( "Received: " + actual ); list = actual.get( 0 ); assertEquals( 1, list.size() ); }
public List<List<String>> parse( InputStream aInputStream, String aDelimiter, String aEncoding ) throws SdiException { return parse( aInputStream, aDelimiter, aEncoding, null ); }
CsvParser { public List<List<String>> parse( InputStream aInputStream, String aDelimiter, String aEncoding ) throws SdiException { return parse( aInputStream, aDelimiter, aEncoding, null ); } }
CsvParser { public List<List<String>> parse( InputStream aInputStream, String aDelimiter, String aEncoding ) throws SdiException { return parse( aInputStream, aDelimiter, aEncoding, null ); }  }
CsvParser { public List<List<String>> parse( InputStream aInputStream, String aDelimiter, String aEncoding ) throws SdiException { return parse( aInputStream, aDelimiter, aEncoding, null ); }  List<List<String>> parse( InputStream aInputStream,
                                     String aDelimiter,
                                     String aEncoding ); List<List<String>> parse( InputStream aInputStream,
                                     String aDelimiter,
                                     String aEncoding,
                                     List<RawDataFilterString> aFilters ); }
CsvParser { public List<List<String>> parse( InputStream aInputStream, String aDelimiter, String aEncoding ) throws SdiException { return parse( aInputStream, aDelimiter, aEncoding, null ); }  List<List<String>> parse( InputStream aInputStream,
                                     String aDelimiter,
                                     String aEncoding ); List<List<String>> parse( InputStream aInputStream,
                                     String aDelimiter,
                                     String aEncoding,
                                     List<RawDataFilterString> aFilters );  }