From 3d44aee6069175038266c65f945147569e6343f6 Mon Sep 17 00:00:00 2001 From: RncLsn Date: Thu, 9 Jul 2015 16:01:01 +0100 Subject: Bug-fix for answer dependencies analysis: now it checks whether the endomorphism makes the first tuple identical to the second one. --- test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test/uk/ac/ox/cs/pagoda/global_tests') 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; import java.nio.file.Files; import java.nio.file.Paths; +import static uk.ac.ox.cs.pagoda.util.TestUtil.getEntityIRI; + public class BugTests { - public static final String NS = "http://example.org/test#%s"; - private IRI getEntityIRI(String name) { - return IRI.create(String.format(NS, name)); - } @Test public void minimumCardinalityAxiom2() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { @@ -41,7 +39,7 @@ public class BugTests { manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(hardWorkingStudent)); OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); - OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(NS, "takesCourse"))); + OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "takesCourse"))); manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); // Class assertions @@ -105,7 +103,7 @@ public class BugTests { OWLNamedIndividual d1 = factory.getOWLNamedIndividual(getEntityIRI("d1")); OWLNamedIndividual d2 = factory.getOWLNamedIndividual(getEntityIRI("d2")); OWLNamedIndividual d3 = factory.getOWLNamedIndividual(getEntityIRI("d3")); - OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(NS, "takesCourse"))); + OWLObjectProperty takesCourse = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "takesCourse"))); manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(takesCourse)); // Class assertions @@ -183,9 +181,9 @@ public class BugTests { OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c")); - OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R"))); + OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "R"))); manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR)); - OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(NS, "P"))); + OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(TestUtil.NS, "P"))); manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP)); // Class assertions -- cgit v1.2.3