code formatting

This commit is contained in:
Claudio Atzori 2021-12-01 15:48:15 +01:00
parent 01e5e0142a
commit 4fe7888817
1 changed files with 26 additions and 23 deletions

View File

@ -1,35 +1,38 @@
package eu.dnetlib.dhp.blacklist;
import eu.dnetlib.dhp.schema.common.ModelSupport; package eu.dnetlib.dhp.blacklist;
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.Arrays;
import java.util.List; import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import eu.dnetlib.dhp.schema.common.ModelSupport;
import eu.dnetlib.dhp.schema.common.RelationInverse;
public class BlacklistRelationTest { public class BlacklistRelationTest {
@Test @Test
public void testRelationInverseLookup() { public void testRelationInverseLookup() {
final List<String> rels = Arrays.asList( final List<String> rels = Arrays
"resultResult_relationship_IsRelatedTo", .asList(
"resultOrganization_affiliation_isAuthorInstitutionOf", "resultResult_relationship_IsRelatedTo",
"resultOrganization_affiliation_hasAuthorInstitution", "resultOrganization_affiliation_isAuthorInstitutionOf",
"datasourceOrganization_provision_isProvidedBy", "resultOrganization_affiliation_hasAuthorInstitution",
"projectOrganization_participation_hasParticipant", "datasourceOrganization_provision_isProvidedBy",
"resultProject_outcome_produces", "projectOrganization_participation_hasParticipant",
"resultProject_outcome_isProducedBy"); "resultProject_outcome_produces",
"resultProject_outcome_isProducedBy");
rels.forEach(r -> { rels.forEach(r -> {
RelationInverse inverse = ModelSupport.relationInverseMap.get(r); RelationInverse inverse = ModelSupport.relationInverseMap.get(r);
Assertions.assertNotNull(inverse); Assertions.assertNotNull(inverse);
Assertions.assertNotNull(inverse.getRelType()); Assertions.assertNotNull(inverse.getRelType());
Assertions.assertNotNull(inverse.getSubReltype()); Assertions.assertNotNull(inverse.getSubReltype());
Assertions.assertNotNull(inverse.getRelClass()); Assertions.assertNotNull(inverse.getRelClass());
}); });
} }
} }