diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-07-03 19:09:31 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-07-03 19:09:31 +0100 |
| commit | 39b60d4225f5efa4e0287a2c6ce69d90391c69db (patch) | |
| tree | 18c5b05726f39baa4d3ca8b228e24ad1f0182f2a /test | |
| parent | 133dab6e21f263df2baca913d3d0b7a4fd152d08 (diff) | |
| download | ACQuA-39b60d4225f5efa4e0287a2c6ce69d90391c69db.tar.gz ACQuA-39b60d4225f5efa4e0287a2c6ce69d90391c69db.zip | |
Many little changes.
Diffstat (limited to 'test')
| -rw-r--r-- | test/resources/BugTests.xml | 7 | ||||
| -rw-r--r-- | test/resources/MainTests.xml (renamed from test/resources/LightTests.xml) | 18 | ||||
| -rw-r--r-- | test/resources/SygeniaTests.xml | 5 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java (renamed from test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java) | 89 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java | 6 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 10 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java | 26 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/util/SimpleProgressBarTester.java | 16 |
8 files changed, 136 insertions, 41 deletions
diff --git a/test/resources/BugTests.xml b/test/resources/BugTests.xml index 5782bd4..c7a80ba 100644 --- a/test/resources/BugTests.xml +++ b/test/resources/BugTests.xml | |||
| @@ -4,13 +4,8 @@ | |||
| 4 | <suite name="BugTests"> | 4 | <suite name="BugTests"> |
| 5 | 5 | ||
| 6 | <test name="BugTest"> | 6 | <test name="BugTest"> |
| 7 | <groups> | ||
| 8 | <run> | ||
| 9 | <include name="BugTesters"/> | ||
| 10 | </run> | ||
| 11 | </groups> | ||
| 12 | <classes> | 7 | <classes> |
| 13 | <class name="uk.ac.ox.cs.pagoda.global_tests.MinimumCardinalityTest"/> | 8 | <class name="uk.ac.ox.cs.pagoda.global_tests.BugTests"/> |
| 14 | </classes> | 9 | </classes> |
| 15 | </test> | 10 | </test> |
| 16 | 11 | ||
diff --git a/test/resources/LightTests.xml b/test/resources/MainTests.xml index bcdc4af..255b68e 100644 --- a/test/resources/LightTests.xml +++ b/test/resources/MainTests.xml | |||
| @@ -1,21 +1,25 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | 2 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > |
| 3 | 3 | ||
| 4 | <suite name="LightTests"> | 4 | <suite name="MainTests"> |
| 5 | <test name="light"> | 5 | <test name="main"> |
| 6 | <groups> | 6 | <groups> |
| 7 | <run> | 7 | <run> |
| 8 | <include name="light"/> | 8 | <!--<include name="correctness"/>--> |
| 9 | <!--<include name="light"/>--> | ||
| 9 | <!--<include name="justExecute"/>--> | 10 | <!--<include name="justExecute"/>--> |
| 10 | <exclude name="nonOriginal"/> | 11 | <!--<!–<include name="heavy"/>–>--> |
| 12 | <include name="nonOriginal"/> | ||
| 11 | </run> | 13 | </run> |
| 12 | </groups> | 14 | </groups> |
| 13 | <classes> | 15 | <classes> |
| 14 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaReactome"/>--> | 16 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaReactome"/>--> |
| 15 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/> | 17 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/>--> |
| 16 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/> | 18 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/>--> |
| 17 | <!--Fly does not terminate: query-5 looks really hard--> | 19 | <!--Fly does not terminate: query-5 looks really hard--> |
| 18 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/>--> | 20 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/> |
| 21 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.SkolemisationTests"/>--> | ||
| 22 | <!--<class name="uk.ac.ox.cs.pagoda.util.SimpleProgressBarTester" />--> | ||
| 19 | </classes> | 23 | </classes> |
| 20 | </test> | 24 | </test> |
| 21 | </suite> \ No newline at end of file | 25 | </suite> \ No newline at end of file |
diff --git a/test/resources/SygeniaTests.xml b/test/resources/SygeniaTests.xml index 01c4eab..4daecf5 100644 --- a/test/resources/SygeniaTests.xml +++ b/test/resources/SygeniaTests.xml | |||
| @@ -11,9 +11,10 @@ | |||
| 11 | </groups> | 11 | </groups> |
| 12 | 12 | ||
| 13 | <classes> | 13 | <classes> |
| 14 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/>--> | 14 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/> |
| 15 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/> | 15 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/> |
| 16 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/>--> | 16 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/> |
| 17 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaReactome"/> | ||
| 17 | </classes> | 18 | </classes> |
| 18 | </test> | 19 | </test> |
| 19 | 20 | ||
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java b/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java index 71c20c1..19e0b2a 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/MinimumCardinalityTest.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/BugTests.java | |||
| @@ -6,6 +6,7 @@ import org.testng.Assert; | |||
| 6 | import org.testng.annotations.Test; | 6 | import org.testng.annotations.Test; |
| 7 | import uk.ac.ox.cs.pagoda.query.AnswerTuple; | 7 | import uk.ac.ox.cs.pagoda.query.AnswerTuple; |
| 8 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; | 8 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; |
| 9 | import uk.ac.ox.cs.pagoda.query.QueryRecord; | ||
| 9 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; | 10 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; |
| 10 | import uk.ac.ox.cs.pagoda.util.TestUtil; | 11 | import uk.ac.ox.cs.pagoda.util.TestUtil; |
| 11 | 12 | ||
| @@ -13,7 +14,7 @@ import java.io.IOException; | |||
| 13 | import java.nio.file.Files; | 14 | import java.nio.file.Files; |
| 14 | import java.nio.file.Paths; | 15 | import java.nio.file.Paths; |
| 15 | 16 | ||
| 16 | public class MinimumCardinalityTest { | 17 | public class BugTests { |
| 17 | 18 | ||
| 18 | public static final String NS = "http://example.org/test#%s"; | 19 | public static final String NS = "http://example.org/test#%s"; |
| 19 | 20 | ||
| @@ -21,8 +22,8 @@ public class MinimumCardinalityTest { | |||
| 21 | return IRI.create(String.format(NS, name)); | 22 | return IRI.create(String.format(NS, name)); |
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | @Test(groups = {"BugTesters"}) | 25 | @Test |
| 25 | public void test() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { | 26 | public void minimumCardinalityAxiom() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { |
| 26 | 27 | ||
| 27 | /* | 28 | /* |
| 28 | * Build test ontology | 29 | * Build test ontology |
| @@ -98,4 +99,86 @@ public class MinimumCardinalityTest { | |||
| 98 | } | 99 | } |
| 99 | pagoda.dispose(); | 100 | pagoda.dispose(); |
| 100 | } | 101 | } |
| 102 | |||
| 103 | /** | ||
| 104 | * Bug: the relevant ontology is not a subset of the original one. | ||
| 105 | * | ||
| 106 | * @throws OWLOntologyCreationException | ||
| 107 | * @throws IOException | ||
| 108 | * @throws OWLOntologyStorageException | ||
| 109 | */ | ||
| 110 | @Test | ||
| 111 | public void rTest() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException { | ||
| 112 | |||
| 113 | /* | ||
| 114 | * Build test ontology | ||
| 115 | * */ | ||
| 116 | |||
| 117 | OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); | ||
| 118 | OWLDataFactory factory = manager.getOWLDataFactory(); | ||
| 119 | OWLOntology ontology = manager.createOntology(); | ||
| 120 | |||
| 121 | OWLClass classA = factory.getOWLClass(getEntityIRI("A")); | ||
| 122 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classA)); | ||
| 123 | OWLClass classB = factory.getOWLClass(getEntityIRI("B")); | ||
| 124 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classB)); | ||
| 125 | OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a")); | ||
| 126 | OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b")); | ||
| 127 | OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c")); | ||
| 128 | OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R"))); | ||
| 129 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR)); | ||
| 130 | OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(NS, "P"))); | ||
| 131 | manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP)); | ||
| 132 | |||
| 133 | // Class assertions | ||
| 134 | manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, a)); // A(a) | ||
| 135 | manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, b)); // A(b) | ||
| 136 | manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(roleP, c, a)); // P(c,a) | ||
| 137 | |||
| 138 | // Axioms | ||
| 139 | // subsetOf(A someValuesFrom(R owl:Thing)) | ||
| 140 | manager.addAxiom(ontology, | ||
| 141 | factory.getOWLSubClassOfAxiom(classA, | ||
| 142 | factory.getOWLObjectSomeValuesFrom(roleR, | ||
| 143 | factory.getOWLThing()))); | ||
| 144 | |||
| 145 | // inverseFunctional(R) | ||
| 146 | manager.addAxiom(ontology, | ||
| 147 | factory.getOWLInverseFunctionalObjectPropertyAxiom(roleR)); | ||
| 148 | |||
| 149 | // subsetOf(someValuesFrom(inverseOf(P) owl:thing) B) | ||
| 150 | manager.addAxiom(ontology, | ||
| 151 | factory.getOWLSubClassOfAxiom(factory.getOWLObjectSomeValuesFrom(roleP.getInverseProperty(), | ||
| 152 | factory.getOWLThing()), | ||
| 153 | classB)); | ||
| 154 | /* | ||
| 155 | * Save the ontology | ||
| 156 | * */ | ||
| 157 | |||
| 158 | // manager.saveOntology(ontology, Files.newOutputStream(Paths.get("/home/alessandro/Desktop/test-ontology.owl"))); | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Test one query | ||
| 162 | * */ | ||
| 163 | |||
| 164 | QueryReasoner pagoda = QueryReasoner.getInstance(ontology); | ||
| 165 | pagoda.loadOntology(ontology); | ||
| 166 | if(pagoda.preprocess()) { | ||
| 167 | String queryStr = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> " + | ||
| 168 | "select distinct ?x" + | ||
| 169 | " where { " | ||
| 170 | + " ?x rdf:type " + classB + | ||
| 171 | " }"; | ||
| 172 | QueryRecord queryRecord = pagoda.getQueryManager().create(queryStr); | ||
| 173 | System.out.println(queryRecord); | ||
| 174 | pagoda.evaluate(queryRecord); | ||
| 175 | AnswerTuples answers = queryRecord.getAnswers(); | ||
| 176 | System.out.println("Difficulty: " + queryRecord.getDifficulty()); | ||
| 177 | for(AnswerTuple ans; answers.isValid(); answers.moveNext()) { | ||
| 178 | ans = answers.getTuple(); | ||
| 179 | TestUtil.logInfo(ans); | ||
| 180 | } | ||
| 181 | } | ||
| 182 | pagoda.dispose(); | ||
| 183 | } | ||
| 101 | } | 184 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java index 31d2eac..0ce3d69 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java | |||
| @@ -25,7 +25,6 @@ public class TestPagodaFLY { | |||
| 25 | .query(Paths.get(ontoDir, "fly/queries/fly.sparql")) | 25 | .query(Paths.get(ontoDir, "fly/queries/fly.sparql")) |
| 26 | .answer(answers) | 26 | .answer(answers) |
| 27 | .classify(false) | 27 | .classify(false) |
| 28 | .hermit(true) | ||
| 29 | .build(); | 28 | .build(); |
| 30 | 29 | ||
| 31 | pagoda.run(); | 30 | pagoda.run(); |
| @@ -45,7 +44,6 @@ public class TestPagodaFLY { | |||
| 45 | .answer(answers) | 44 | .answer(answers) |
| 46 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) | 45 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) |
| 47 | .classify(false) | 46 | .classify(false) |
| 48 | .hermit(true) | ||
| 49 | .build(); | 47 | .build(); |
| 50 | 48 | ||
| 51 | pagoda.run(); | 49 | pagoda.run(); |
| @@ -57,8 +55,8 @@ public class TestPagodaFLY { | |||
| 57 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | 55 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); |
| 58 | 56 | ||
| 59 | Pagoda.builder() | 57 | Pagoda.builder() |
| 60 | .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) | 58 | // .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) |
| 61 | // .ontology(Paths.get(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl")) | 59 | .ontology(Paths.get(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl")) |
| 62 | .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) | 60 | .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) |
| 63 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) | 61 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) |
| 64 | .classify(false) | 62 | .classify(false) |
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java index fdbfc42..c893f96 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | |||
| @@ -23,8 +23,6 @@ public class TestPagodaLUBM { | |||
| 23 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | 23 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) |
| 24 | .query(Paths.get(ontoDir, "lubm/queries/test.sparql")) | 24 | .query(Paths.get(ontoDir, "lubm/queries/test.sparql")) |
| 25 | .answer(answers) | 25 | .answer(answers) |
| 26 | .classify(true) | ||
| 27 | .hermit(true) | ||
| 28 | .build(); | 26 | .build(); |
| 29 | 27 | ||
| 30 | pagoda.run(); | 28 | pagoda.run(); |
| @@ -45,11 +43,9 @@ public class TestPagodaLUBM { | |||
| 45 | Pagoda pagoda = Pagoda.builder() | 43 | Pagoda pagoda = Pagoda.builder() |
| 46 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | 44 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) |
| 47 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | 45 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) |
| 48 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia.sparql")) | 46 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia.sparql")) |
| 49 | // .answer(answers) | 47 | // .answer(answers) |
| 50 | .classify(true) | 48 | .build(); |
| 51 | .hermit(true) | ||
| 52 | .build(); | ||
| 53 | 49 | ||
| 54 | pagoda.run(); | 50 | pagoda.run(); |
| 55 | // CheckAnswers.assertSameAnswers(answers, givenAnswers); | 51 | // CheckAnswers.assertSameAnswers(answers, givenAnswers); |
| @@ -71,8 +67,6 @@ public class TestPagodaLUBM { | |||
| 71 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | 67 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) |
| 72 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia_all-blanks.sparql")) | 68 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia_all-blanks.sparql")) |
| 73 | // .answer(answers) | 69 | // .answer(answers) |
| 74 | .classify(true) | ||
| 75 | .hermit(true) | ||
| 76 | .build(); | 70 | .build(); |
| 77 | 71 | ||
| 78 | pagoda.run(); | 72 | pagoda.run(); |
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java index 9fb6cbe..c5b272c 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java | |||
| @@ -41,8 +41,6 @@ public class TestPagodaUOBM { | |||
| 41 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) | 41 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) |
| 42 | .query(Paths.get(ontoDir, "uobm/queries/test.sparql")) | 42 | .query(Paths.get(ontoDir, "uobm/queries/test.sparql")) |
| 43 | .answer(answers) | 43 | .answer(answers) |
| 44 | .classify(true) | ||
| 45 | .hermit(true) | ||
| 46 | .build(); | 44 | .build(); |
| 47 | 45 | ||
| 48 | pagoda.run(); | 46 | pagoda.run(); |
| @@ -65,8 +63,6 @@ public class TestPagodaUOBM { | |||
| 65 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) | 63 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) |
| 66 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) | 64 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) |
| 67 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia.sparql")) | 65 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia.sparql")) |
| 68 | .classify(true) | ||
| 69 | .hermit(true) | ||
| 70 | .build(); | 66 | .build(); |
| 71 | 67 | ||
| 72 | pagoda.run(); | 68 | pagoda.run(); |
| @@ -85,22 +81,30 @@ public class TestPagodaUOBM { | |||
| 85 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) | 81 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) |
| 86 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) | 82 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) |
| 87 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) | 83 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) |
| 88 | .classify(true) | 84 | .build() |
| 89 | .hermit(true) | 85 | .run(); |
| 86 | } | ||
| 87 | |||
| 88 | @Test(groups = {"justExecute", "heavy", "nonOriginal"}) | ||
| 89 | public void justExecute_modifiedUOBM() throws IOException { | ||
| 90 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 91 | |||
| 92 | Pagoda.builder() | ||
| 93 | .ontology(Paths.get(ontoDir, "uobm_modified/univ-bench-dl-modified.owl")) | ||
| 94 | .data(Paths.get(ontoDir, "uobm_modified/data/uobm1.ttl")) | ||
| 95 | .query(Paths.get(ontoDir, "uobm_modified/queries/additional_queries.sparql")) | ||
| 90 | .build() | 96 | .build() |
| 91 | .run(); | 97 | .run(); |
| 92 | } | 98 | } |
| 93 | 99 | ||
| 94 | @Test(groups = {"justExecute"}) | 100 | @Test(groups = {"justExecute"}) |
| 95 | public void justExecute_existentialQueries() throws IOException { | 101 | public void justExecute_additionalQueries() throws IOException { |
| 96 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | 102 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); |
| 97 | 103 | ||
| 98 | Pagoda.builder() | 104 | Pagoda.builder() |
| 99 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl-modified.owl")) | 105 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) |
| 100 | .data(Paths.get(ontoDir, "uobm/data/uobm1.ttl")) | 106 | .data(Paths.get(ontoDir, "uobm/data/uobm1.ttl")) |
| 101 | .query(Paths.get(ontoDir, "uobm/queries/existential_queries.sparql")) | 107 | .query(Paths.get(ontoDir, "uobm/queries/additional_queries.sparql")) |
| 102 | .classify(true) | ||
| 103 | .hermit(true) | ||
| 104 | .build() | 108 | .build() |
| 105 | .run(); | 109 | .run(); |
| 106 | } | 110 | } |
diff --git a/test/uk/ac/ox/cs/pagoda/util/SimpleProgressBarTester.java b/test/uk/ac/ox/cs/pagoda/util/SimpleProgressBarTester.java new file mode 100644 index 0000000..3de30e4 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/util/SimpleProgressBarTester.java | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.util; | ||
| 2 | |||
| 3 | import org.testng.annotations.Test; | ||
| 4 | |||
| 5 | public class SimpleProgressBarTester { | ||
| 6 | |||
| 7 | @Test | ||
| 8 | public void test() throws InterruptedException { | ||
| 9 | SimpleProgressBar simpleProgressBar = new SimpleProgressBar("TestBar", 1000); | ||
| 10 | for(int i = 0; i < 1000; i++) { | ||
| 11 | simpleProgressBar.update(i); | ||
| 12 | Thread.sleep(10); | ||
| 13 | } | ||
| 14 | simpleProgressBar.dispose(); | ||
| 15 | } | ||
| 16 | } | ||
