use of org.eol.globi.data.DatasetImporterForTSV in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method defaultTSVImporterCachedZenodo.
@Test
public void defaultTSVImporterCachedZenodo() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistry datasetRegistry = new DatasetRegistryWithCache(new DatasetRegistryZenodo(inStream -> inStream), dataset -> CacheUtil.cacheFor(dataset.getNamespace(), "target/datasets", inStream -> inStream));
DatasetImporter importer = getTemplateImporter(datasetRegistry, "globalbioticinteractions/template-dataset");
DatasetImporterForTSV importerTSV = (DatasetImporterForTSV) importer;
assertThat(importerTSV.getSourceCitation(), containsString("doi.org"));
}
use of org.eol.globi.data.DatasetImporterForTSV in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method defaultTSVImporterCached.
@Test
public void defaultTSVImporterCached() throws StudyImporterException, DatasetRegistryException, IOException {
final DatasetRegistry datasetRegistry = new DatasetRegistryWithCache(new DatasetRegistryGitHubArchive(inStream -> inStream), dataset -> CacheUtil.cacheFor(dataset.getNamespace(), "target/datasets", inStream -> inStream));
DatasetImporter importer = getTemplateImporter(datasetRegistry, "globalbioticinteractions/template-dataset");
DatasetImporterForTSV importerTSV = (DatasetImporterForTSV) importer;
assertThat(importerTSV.getBaseUrl(), startsWith("https://github.com/globalbioticinteractions/template-dataset/"));
assertThat(importerTSV.getDataset().retrieve(URI.create("globi.json")), is(notNullValue()));
}
Aggregations