[Graph Dump] Test for extraction of rels from entities extended

This commit is contained in:
Miriam Baglioni 2021-12-23 10:15:30 +01:00
parent 31b26d48ac
commit 69e9ea9eeb
1 changed files with 34 additions and 0 deletions

View File

@ -115,6 +115,23 @@ public class ExtractRelationFromEntityTest {
.getReltype() .getReltype()
.getType()); .getType());
Assertions
.assertEquals(
"context", verificationDataset
.filter((FilterFunction<Relation>) row -> row.getSource().getId().startsWith("00"))
.collectAsList()
.get(0)
.getSource()
.getType());
Assertions
.assertEquals(
"result", verificationDataset
.filter((FilterFunction<Relation>) row -> row.getSource().getId().startsWith("00"))
.collectAsList()
.get(0)
.getTarget()
.getType());
Assertions Assertions
.assertEquals( .assertEquals(
"IsRelatedTo", verificationDataset "IsRelatedTo", verificationDataset
@ -133,6 +150,23 @@ public class ExtractRelationFromEntityTest {
.getReltype() .getReltype()
.getType()); .getType());
Assertions
.assertEquals(
"context", verificationDataset
.filter((FilterFunction<Relation>) row -> row.getTarget().getId().startsWith("00"))
.collectAsList()
.get(0)
.getTarget()
.getType());
Assertions
.assertEquals(
"result", verificationDataset
.filter((FilterFunction<Relation>) row -> row.getTarget().getId().startsWith("00"))
.collectAsList()
.get(0)
.getSource()
.getType());
} }
} }