use of org.eol.globi.util.InteractTypeMapper in project eol-globi-data by jhpoelen.
the class DatasetImporterForMetaTableTest method interactionTypeMapping.
@Test
public void interactionTypeMapping() {
InteractTypeMapper mapper = new InteractTypeMapper() {
@Override
public boolean shouldIgnoreInteractionType(String nameOrId) {
return false;
}
@Override
public InteractType getInteractType(String nameOrId) {
return null;
}
};
assertThat(DatasetImporterForMetaTable.generateInteractionType(interactMap("donald"), mapper), is(nullValue()));
}
use of org.eol.globi.util.InteractTypeMapper in project eol-globi-data by jhpoelen.
the class DatasetImporterForMetaTableTest method interactionTypeMappingValid.
@Test
public void interactionTypeMappingValid() {
InteractTypeMapper mapper = new InteractTypeMapper() {
@Override
public boolean shouldIgnoreInteractionType(String nameOrId) {
return false;
}
@Override
public InteractType getInteractType(String nameOrId) {
return InteractType.POLLINATES;
}
};
assertThat(DatasetImporterForMetaTable.generateInteractionType(interactMap("pollinator"), mapper), is(InteractType.POLLINATES));
}
Aggregations