use of org.eol.globi.process.InteractionValidator in project eol-globi-data by jhpoelen.
the class DatasetImporterForMangalIT method importAll.
@Test
public void importAll() throws StudyImporterException {
AtomicInteger counter = new AtomicInteger(0);
DatasetImporterForMangal importer = new DatasetImporterForMangal(null, null);
importer.setDataset(new DatasetLocal(inStream -> inStream));
importer.setInteractionListener(new InteractionValidator(new InteractionListener() {
@Override
public void on(Map<String, String> interaction) throws StudyImporterException {
counter.incrementAndGet();
}
}, new NullImportLogger() {
@Override
public void warn(LogContext ctx, String message) {
fail("unexpected warning: [" + message + "]");
}
}));
importer.importStudy();
assertThat(counter.get() > 0, Is.is(true));
}
use of org.eol.globi.process.InteractionValidator in project eol-globi-data by jhpoelen.
the class DatasetImporterForBatBaseIT method importAll.
@Test
public void importAll() throws StudyImporterException {
AtomicInteger counter = new AtomicInteger(0);
DatasetImporterForBatBase importer = new DatasetImporterForBatBase(null, null);
DatasetImpl dataset = new DatasetImpl("test/batplant", URI.create("classpath:/org/eol/globi/data/batplant/"), is -> is);
importer.setDataset(dataset);
importer.setInteractionListener(new InteractionValidator(new InteractionListener() {
@Override
public void on(Map<String, String> interaction) throws StudyImporterException {
counter.incrementAndGet();
}
}, new NullImportLogger() {
@Override
public void warn(LogContext ctx, String message) {
fail("unexpected warning: [" + message + "]");
}
}));
importer.importStudy();
assertThat(counter.get() > 0, Is.is(true));
}
Aggregations