@Test public void testCreateExtractor() { String path = AllTests.class.getResource("taxa.txt").getPath(); File file = new File(path); ETLStatistics etlStatistics = new ETLStatistics(); CoLTaxonImporter coLTaxonImporter = new CoLTaxonImporter(); Object returned = ReflectionUtil.call(coLTaxonImporter, "createExtractor", new Class[] {ETLStatistics.class, File.class}, new Object[] {etlStatistics, file}); CSVExtractor<CoLTaxonCsvField> actual = (CSVExtractor<CoLTaxonCsvField>) returned; char expectedDelimiter = '\t'; String expectedCharterSet = "UTF-8"; assertNotNull("01",actual); assertEquals("02",expectedDelimiter, actual.getDelimiter()); assertEquals("03",expectedCharterSet, actual.getCharset().toString()); }
private CSVExtractor<CoLTaxonCsvField> createExtractor(ETLStatistics stats, File f) { CSVExtractor<CoLTaxonCsvField> extractor; extractor = new CSVExtractor<>(f, CoLTaxonCsvField.class, stats); extractor.setSkipHeader(true); extractor.setDelimiter('\t'); extractor.setSuppressErrors(suppressErrors); return extractor; }
CoLTaxonImporter extends CoLImporter { private CSVExtractor<CoLTaxonCsvField> createExtractor(ETLStatistics stats, File f) { CSVExtractor<CoLTaxonCsvField> extractor; extractor = new CSVExtractor<>(f, CoLTaxonCsvField.class, stats); extractor.setSkipHeader(true); extractor.setDelimiter('\t'); extractor.setSuppressErrors(suppressErrors); return extractor; } }
CoLTaxonImporter extends CoLImporter { private CSVExtractor<CoLTaxonCsvField> createExtractor(ETLStatistics stats, File f) { CSVExtractor<CoLTaxonCsvField> extractor; extractor = new CSVExtractor<>(f, CoLTaxonCsvField.class, stats); extractor.setSkipHeader(true); extractor.setDelimiter('\t'); extractor.setSuppressErrors(suppressErrors); return extractor; } CoLTaxonImporter(); }
CoLTaxonImporter extends CoLImporter { private CSVExtractor<CoLTaxonCsvField> createExtractor(ETLStatistics stats, File f) { CSVExtractor<CoLTaxonCsvField> extractor; extractor = new CSVExtractor<>(f, CoLTaxonCsvField.class, stats); extractor.setSkipHeader(true); extractor.setDelimiter('\t'); extractor.setSuppressErrors(suppressErrors); return extractor; } CoLTaxonImporter(); static void main(String[] args); void importCsv(String path); }
CoLTaxonImporter extends CoLImporter { private CSVExtractor<CoLTaxonCsvField> createExtractor(ETLStatistics stats, File f) { CSVExtractor<CoLTaxonCsvField> extractor; extractor = new CSVExtractor<>(f, CoLTaxonCsvField.class, stats); extractor.setSkipHeader(true); extractor.setDelimiter('\t'); extractor.setSuppressErrors(suppressErrors); return extractor; } CoLTaxonImporter(); static void main(String[] args); void importCsv(String path);  }