Search in sources :

Example 1 with BaseStudyImporter

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

the class GitHubImporterFactoryIT method createSIAD.

@Test
public void createSIAD() throws StudyImporterException, DatasetFinderException {
    final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
    StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/siad");
    assertThat(importer, is(notNullValue()));
    Dataset dataset = ((BaseStudyImporter) importer).getDataset();
    final JsonNode config = dataset.getConfig();
    assertThat(config, is(notNullValue()));
    assertThat(dataset.getOrDefault(DatasetConstant.SHOULD_RESOLVE_REFERENCES, "donald"), is("false"));
}
Also used : JsonNode(org.codehaus.jackson.JsonNode) BaseStudyImporter(org.eol.globi.data.BaseStudyImporter) BaseStudyImporter(org.eol.globi.data.BaseStudyImporter) StudyImporter(org.eol.globi.data.StudyImporter) Test(org.junit.Test)

Example 2 with BaseStudyImporter

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

the class GitHubImporterFactoryIT method createHurlbert.

@Test
public void createHurlbert() throws StudyImporterException, DatasetFinderException {
    final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
    StudyImporter importer = importerFor(datasetFinderGitHubRemote, "hurlbertlab/dietdatabase");
    assertThat(importer, is(notNullValue()));
    assertThat(importer, is(instanceOf(StudyImporterForHurlbert.class)));
    final JsonNode config = ((BaseStudyImporter) importer).getDataset().getConfig();
    assertThat(config, is(notNullValue()));
}
Also used : JsonNode(org.codehaus.jackson.JsonNode) BaseStudyImporter(org.eol.globi.data.BaseStudyImporter) StudyImporter(org.eol.globi.data.StudyImporter) Test(org.junit.Test)

Aggregations

JsonNode (org.codehaus.jackson.JsonNode)2 BaseStudyImporter (org.eol.globi.data.BaseStudyImporter)2 StudyImporter (org.eol.globi.data.StudyImporter)2 Test (org.junit.Test)2