forked from D-Net/dnet-hadoop
added test to verify the relation inverse lookup operation
This commit is contained in:
parent
0df9574a6f
commit
01e5e0142a
|
@ -0,0 +1,35 @@
|
|||
package eu.dnetlib.dhp.blacklist;
|
||||
|
||||
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
||||
import eu.dnetlib.dhp.schema.common.RelationInverse;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class BlacklistRelationTest {
|
||||
|
||||
@Test
|
||||
public void testRelationInverseLookup() {
|
||||
|
||||
final List<String> rels = Arrays.asList(
|
||||
"resultResult_relationship_IsRelatedTo",
|
||||
"resultOrganization_affiliation_isAuthorInstitutionOf",
|
||||
"resultOrganization_affiliation_hasAuthorInstitution",
|
||||
"datasourceOrganization_provision_isProvidedBy",
|
||||
"projectOrganization_participation_hasParticipant",
|
||||
"resultProject_outcome_produces",
|
||||
"resultProject_outcome_isProducedBy");
|
||||
|
||||
rels.forEach(r -> {
|
||||
RelationInverse inverse = ModelSupport.relationInverseMap.get(r);
|
||||
Assertions.assertNotNull(inverse);
|
||||
Assertions.assertNotNull(inverse.getRelType());
|
||||
Assertions.assertNotNull(inverse.getSubReltype());
|
||||
Assertions.assertNotNull(inverse.getRelClass());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue