2021-12-01 15:48:15 +01:00
|
|
|
|
2021-12-01 09:46:26 +01:00
|
|
|
package eu.dnetlib.dhp.blacklist;
|
|
|
|
|
2021-12-01 15:48:15 +01:00
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
|
2021-12-01 09:46:26 +01:00
|
|
|
import org.junit.jupiter.api.Assertions;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
2021-12-01 15:48:15 +01:00
|
|
|
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
|
|
|
import eu.dnetlib.dhp.schema.common.RelationInverse;
|
2021-12-01 09:46:26 +01:00
|
|
|
|
|
|
|
public class BlacklistRelationTest {
|
|
|
|
|
2021-12-01 15:48:15 +01:00
|
|
|
@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());
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2021-12-01 09:46:26 +01:00
|
|
|
|
|
|
|
}
|