Search in sources :

Example 1 with StudyImporterForCoetzer

use of org.eol.globi.data.StudyImporterForCoetzer in project eol-globi-data by jhpoelen.

the class GitHubImporterFactoryIT method createAfrotropicalBees.

@Test
public void createAfrotropicalBees() throws StudyImporterException, DatasetFinderException {
    final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
    String repo = "globalbioticinteractions/Catalogue-of-Afrotropical-Bees";
    StudyImporter importer = importerFor(datasetFinderGitHubRemote, repo);
    assertThat(importer, is(notNullValue()));
    assertThat(importer, is(instanceOf(StudyImporterForCoetzer.class)));
    assertThat(((StudyImporterForCoetzer) importer).getDataset(), is(notNullValue()));
    String archiveURL = ((StudyImporterForCoetzer) importer).getResourceArchiveURI();
    assertThat(archiveURL, endsWith("CatalogueOfAfrotropicalBees.zip"));
    assertThat(URI.create(archiveURL).isAbsolute(), is(true));
}
Also used : StudyImporterForCoetzer(org.eol.globi.data.StudyImporterForCoetzer) StringContains.containsString(org.junit.internal.matchers.StringContains.containsString) BaseStudyImporter(org.eol.globi.data.BaseStudyImporter) StudyImporter(org.eol.globi.data.StudyImporter) Test(org.junit.Test)

Aggregations

BaseStudyImporter (org.eol.globi.data.BaseStudyImporter)1 StudyImporter (org.eol.globi.data.StudyImporter)1 StudyImporterForCoetzer (org.eol.globi.data.StudyImporterForCoetzer)1 Test (org.junit.Test)1 StringContains.containsString (org.junit.internal.matchers.StringContains.containsString)1