aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala')
-rw-r--r--src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala b/src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala
index 35af464..e2da6e4 100644
--- a/src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala
+++ b/src/test/scala/uk/ac/ox/cs/rsacomb/RDFoxConverterSpec.scala
@@ -32,7 +32,11 @@ object RDFoxConverterSpec {
32 ) 32 )
33} 33}
34 34
35class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement { 35class RDFoxConverterSpec
36 extends AnyFlatSpec
37 with Matchers
38 with LoneElement
39 with RDFoxConverter {
36 40
37 import RDFoxConverterSpec._ 41 import RDFoxConverterSpec._
38 42
@@ -40,7 +44,7 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
40 val cls = factory.getOWLClass(iriString0) 44 val cls = factory.getOWLClass(iriString0)
41 val atom = TupleTableAtom.rdf(term0, IRI.RDF_TYPE, IRI.create(iriString0)) 45 val atom = TupleTableAtom.rdf(term0, IRI.RDF_TYPE, IRI.create(iriString0))
42 val (res, ext) = 46 val (res, ext) =
43 RDFoxConverter.convert(cls, term0, List(), SkolemStrategy.None, Empty) 47 convert(cls, term0, List(), SkolemStrategy.None, Empty)
44 res.loneElement shouldEqual atom 48 res.loneElement shouldEqual atom
45 ext shouldBe empty 49 ext shouldBe empty
46 } 50 }
@@ -51,13 +55,13 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
51 val cls2 = factory.getOWLClass(iriString2) 55 val cls2 = factory.getOWLClass(iriString2)
52 val conj = factory.getOWLObjectIntersectionOf(cls0, cls1, cls2) 56 val conj = factory.getOWLObjectIntersectionOf(cls0, cls1, cls2)
53 val (res0, ext0) = 57 val (res0, ext0) =
54 RDFoxConverter.convert(cls0, term0, List(), SkolemStrategy.None, Empty) 58 convert(cls0, term0, List(), SkolemStrategy.None, Empty)
55 val (res1, ext1) = 59 val (res1, ext1) =
56 RDFoxConverter.convert(cls1, term0, List(), SkolemStrategy.None, Empty) 60 convert(cls1, term0, List(), SkolemStrategy.None, Empty)
57 val (res2, ext2) = 61 val (res2, ext2) =
58 RDFoxConverter.convert(cls2, term0, List(), SkolemStrategy.None, Empty) 62 convert(cls2, term0, List(), SkolemStrategy.None, Empty)
59 val (res, ext) = 63 val (res, ext) =
60 RDFoxConverter.convert(conj, term0, List(), SkolemStrategy.None, Empty) 64 convert(conj, term0, List(), SkolemStrategy.None, Empty)
61 res should contain theSameElementsAs (res0 ::: res1 ::: res2) 65 res should contain theSameElementsAs (res0 ::: res1 ::: res2)
62 ext should contain theSameElementsAs (ext0 ::: ext1 ::: ext2) 66 ext should contain theSameElementsAs (ext0 ::: ext1 ::: ext2)
63 } 67 }
@@ -66,9 +70,9 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
66 val cls0 = factory.getOWLClass(iriString0) 70 val cls0 = factory.getOWLClass(iriString0)
67 val conj = factory.getOWLObjectIntersectionOf(cls0) 71 val conj = factory.getOWLObjectIntersectionOf(cls0)
68 val (res0, ext0) = 72 val (res0, ext0) =
69 RDFoxConverter.convert(cls0, term0, List(), SkolemStrategy.None, Empty) 73 convert(cls0, term0, List(), SkolemStrategy.None, Empty)
70 val (res, ext) = 74 val (res, ext) =
71 RDFoxConverter.convert(conj, term0, List(), SkolemStrategy.None, Empty) 75 convert(conj, term0, List(), SkolemStrategy.None, Empty)
72 res should contain theSameElementsAs res0 76 res should contain theSameElementsAs res0
73 ext should contain theSameElementsAs ext0 77 ext should contain theSameElementsAs ext0
74 } 78 }
@@ -78,7 +82,7 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
78 for (sx <- suffixes) { 82 for (sx <- suffixes) {
79 val atom = 83 val atom =
80 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: sx), term1) 84 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: sx), term1)
81 RDFoxConverter.convert(prop, term0, term1, sx) shouldEqual atom 85 convert(prop, term0, term1, sx) shouldEqual atom
82 } 86 }
83 } 87 }
84 88
@@ -88,7 +92,7 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
88 for (sx <- Seq(Empty, Forward, Backward)) { 92 for (sx <- Seq(Empty, Forward, Backward)) {
89 val atom = 93 val atom =
90 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: sx + Inverse), term1) 94 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: sx + Inverse), term1)
91 RDFoxConverter.convert(inv, term0, term1, sx) shouldEqual atom 95 convert(inv, term0, term1, sx) shouldEqual atom
92 } 96 }
93 } 97 }
94 98
@@ -97,7 +101,7 @@ class RDFoxConverterSpec extends AnyFlatSpec with Matchers with LoneElement {
97 for (suffix <- suffixes) { 101 for (suffix <- suffixes) {
98 val atom = 102 val atom =
99 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: suffix), term1) 103 TupleTableAtom.rdf(term0, IRI.create(iriString0 :: suffix), term1)
100 RDFoxConverter.convert(prop, term0, term1, suffix) shouldEqual atom 104 convert(prop, term0, term1, suffix) shouldEqual atom
101 } 105 }
102 } 106 }
103 107