@Test public void hasNotEnclosures_HasNotNewLine() throws Exception { File tmp = createTestFile( "utf-8", "a,b\na," ); try { doTest( tmp ); } finally { tmp.delete(); } }
public void doTest( File file ) throws Exception { CsvInputData data = new CsvInputData(); CsvInputMeta meta = createMeta( file, createInputFileFields( "a", "b" ) ); List<Object[]> actual; try { csvInput.init( meta, data ); actual = TransTestingUtil.execute( csvInput, meta, data, 2, false ); } finally { csvInput.dispose( meta, data ); } List<Object[]> expected = Arrays.asList( new Object[] { "a", "b", 1L }, new Object[] { "a", null, 2L } ); TransTestingUtil.assertResult( expected, actual ); }