@SuppressWarnings("deprecation") @Test void testIteratorValueHeaderMismatchOneNonEmptyValue() throws IOException { File csvFile = new ClassPathResource("testdatamissingvalue.csv").getFile(); Exception exception = assertThrows( MolgenisDataException.class, () -> new CsvIterator(csvFile, "testdatamissingvalue", null, ',', entityType).next()); assertThat(exception.getMessage()) .containsPattern( "Number of values \\(1\\) doesn't match the number of headers \\(2\\): \\[val1\\]"); }
@Override public Entity next() { Entity entity = get(); if (entity == null) { throw new NoSuchElementException(); } getNext = true; return entity; }
CsvIterator implements CloseableIterator<Entity> { @Override public Entity next() { Entity entity = get(); if (entity == null) { throw new NoSuchElementException(); } getNext = true; return entity; } }
CsvIterator implements CloseableIterator<Entity> { @Override public Entity next() { Entity entity = get(); if (entity == null) { throw new NoSuchElementException(); } getNext = true; return entity; } CsvIterator(
      File file, String repositoryName, List<CellProcessor> cellProcessors, Character separator);   CsvIterator(
      File file,
      String repositoryName,
      List<CellProcessor> cellProcessors,
      Character separator,
      EntityType entityType); }
CsvIterator implements CloseableIterator<Entity> { @Override public Entity next() { Entity entity = get(); if (entity == null) { throw new NoSuchElementException(); } getNext = true; return entity; } CsvIterator(
      File file, String repositoryName, List<CellProcessor> cellProcessors, Character separator);   CsvIterator(
      File file,
      String repositoryName,
      List<CellProcessor> cellProcessors,
      Character separator,
      EntityType entityType); @Override boolean hasNext(); @Override Entity next(); @Override void remove(); @Override void close(); }
CsvIterator implements CloseableIterator<Entity> { @Override public Entity next() { Entity entity = get(); if (entity == null) { throw new NoSuchElementException(); } getNext = true; return entity; } CsvIterator(
      File file, String repositoryName, List<CellProcessor> cellProcessors, Character separator);   CsvIterator(
      File file,
      String repositoryName,
      List<CellProcessor> cellProcessors,
      Character separator,
      EntityType entityType); @Override boolean hasNext(); @Override Entity next(); @Override void remove(); @Override void close();  }