diff options
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java b/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java index 6e60e24..3f14ec7 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java | |||
| @@ -14,13 +14,11 @@ import java.io.IOException; | |||
| 14 | import java.nio.file.Files; | 14 | import java.nio.file.Files; |
| 15 | import java.nio.file.Paths; | 15 | import java.nio.file.Paths; |
| 16 | 16 | ||
| 17 | import static uk.ac.ox.cs.pagoda.util.TestUtil.getEntityIRI; | ||
| 18 | |||
| 17 | public class BugTests { | 19 | public class BugTests { |
| 18 | 20 | ||
| 19 | public static final String NS = "http://example.org/test#%s"; | ||
| 20 | 21 | ||
| 21 | private IRI getEntityIRI(String name) { | ||
| 22 | return IRI.create(String.format(NS, name)); | ||
| 23 | } | ||
| 24 | 22 | ||
| 25 | @Test | 23 | @Test |
| 26 | public void minimumCardinalityAxiom2() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { | 24 | public void minimumCardinalityAxiom2() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { |
| @@ -41,7 +39,7 @@ public class BugTests { | |||
| 41 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(hardWorkingStudent)); | 39 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(hardWorkingStudent)); |
| 42 | OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); | 40 | OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); |
| 43 | OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); | 41 | OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); |
| 44 | OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(NS, "takesCourse"))); | 42 | OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "takesCourse"))); |
| 45 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); | 43 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); |
| 46 | 44 | ||
| 47 | // Class assertions | 45 | // Class assertions |
| @@ -105,7 +103,7 @@ public class BugTests { | |||
| 105 | OWLNamedIndividual d1 = factory.getOWLNamedIndividual(getEntityIRI("d1")); | 103 | OWLNamedIndividual d1 = factory.getOWLNamedIndividual(getEntityIRI("d1")); |
| 106 | OWLNamedIndividual d2 = factory.getOWLNamedIndividual(getEntityIRI("d2")); | 104 | OWLNamedIndividual d2 = factory.getOWLNamedIndividual(getEntityIRI("d2")); |
| 107 | OWLNamedIndividual d3 = factory.getOWLNamedIndividual(getEntityIRI("d3")); | 105 | OWLNamedIndividual d3 = factory.getOWLNamedIndividual(getEntityIRI("d3")); |
| 108 | OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(NS, "takesCourse"))); | 106 | OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "takesCourse"))); |
| 109 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); | 107 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); |
| 110 | 108 | ||
| 111 | // Class assertions | 109 | // Class assertions |
| @@ -183,9 +181,9 @@ public class BugTests { | |||
| 183 | OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); | 181 | OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); |
| 184 | OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); | 182 | OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); |
| 185 | OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c")); | 183 | OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c")); |
| 186 | OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R"))); | 184 | OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "R"))); |
| 187 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR)); | 185 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR)); |
| 188 | OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(NS, "P"))); | 186 | OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "P"))); |
| 189 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP)); | 187 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP)); |
| 190 | 188 | ||
| 191 | // Class assertions | 189 | // Class assertions |
