[aggregator graph] added more assertions in test

This commit is contained in:
Claudio Atzori 2022-08-03 12:26:05 +02:00
parent 1138b2ac8e
commit e62018e95d
1 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.BeforeEach;
@ -252,6 +253,18 @@ public class MigrateDbEntitiesApplicationTest {
assertValidId(r2.getSource());
assertEquals(r1.getSource(), r2.getTarget());
assertEquals(r2.getSource(), r1.getTarget());
assertTrue(r1.getSource().startsWith("10|"));
assertTrue(r1.getTarget().startsWith("20|"));
assertEquals(ModelConstants.DATASOURCE_ORGANIZATION, r1.getRelType());
assertEquals(ModelConstants.DATASOURCE_ORGANIZATION, r2.getRelType());
assertEquals(ModelConstants.PROVISION, r1.getSubRelType());
assertEquals(ModelConstants.PROVISION, r2.getSubRelType());
assertEquals(ModelConstants.IS_PROVIDED_BY, r1.getRelClass());
assertEquals(ModelConstants.PROVIDES, r2.getRelClass());
}
@Test