diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-06-26 17:41:35 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-06-26 17:41:35 +0100 |
| commit | 1013812b487bc438df49ec93ad9433438d5d6cf6 (patch) | |
| tree | d656446445ce3f25f2d2e4cfd65014ba5fd6b267 /test | |
| parent | 271b05caedafb3b7433d2163d59b2ab5f8106dfe (diff) | |
| download | ACQuA-1013812b487bc438df49ec93ad9433438d5d6cf6.tar.gz ACQuA-1013812b487bc438df49ec93ad9433438d5d6cf6.zip | |
Summarisation before Skolemisation. Added Reactome testcase.
Diffstat (limited to 'test')
5 files changed, 34 insertions, 6 deletions
diff --git a/test/resources/LightTests.xml b/test/resources/LightTests.xml index 69cb572..544833b 100644 --- a/test/resources/LightTests.xml +++ b/test/resources/LightTests.xml | |||
| @@ -7,13 +7,15 @@ | |||
| 7 | <run> | 7 | <run> |
| 8 | <include name="light"/> | 8 | <include name="light"/> |
| 9 | <!--<include name="justExecute"/>--> | 9 | <!--<include name="justExecute"/>--> |
| 10 | <exclude name="nonOriginal"/> | ||
| 10 | </run> | 11 | </run> |
| 11 | </groups> | 12 | </groups> |
| 12 | <classes> | 13 | <classes> |
| 13 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/> | 14 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaReactome"/>--> |
| 15 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaUOBM"/>--> | ||
| 14 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/>--> | 16 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaLUBM"/>--> |
| 15 | <!--Fly does not terminate: query-5 looks really hard--> | 17 | <!--Fly does not terminate: query-5 looks really hard--> |
| 16 | <!--<class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/>--> | 18 | <class name="uk.ac.ox.cs.pagoda.global_tests.TestPagodaFLY"/> |
| 17 | </classes> | 19 | </classes> |
| 18 | </test> | 20 | </test> |
| 19 | </suite> \ No newline at end of file | 21 | </suite> \ No newline at end of file |
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 caaad35..31d2eac 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java | |||
| @@ -52,7 +52,7 @@ public class TestPagodaFLY { | |||
| 52 | CheckAnswers.assertSameAnswers(answers, givenAnswers); | 52 | CheckAnswers.assertSameAnswers(answers, givenAnswers); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | @Test(groups = {"light", "justExecute"}) | 55 | @Test(groups = {"light", "justExecute", "nonOriginal"}) |
| 56 | public void justExecute_newQueries() throws IOException { | 56 | public void justExecute_newQueries() throws IOException { |
| 57 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | 57 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); |
| 58 | 58 | ||
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java new file mode 100644 index 0000000..5c05b94 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.global_tests; | ||
| 2 | |||
| 3 | import org.testng.annotations.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.Pagoda; | ||
| 5 | import uk.ac.ox.cs.pagoda.util.TestUtil; | ||
| 6 | |||
| 7 | import java.io.IOException; | ||
| 8 | import java.nio.file.Paths; | ||
| 9 | |||
| 10 | public class TestPagodaReactome { | ||
| 11 | |||
| 12 | @Test(groups = {"light"}) | ||
| 13 | public void justExecute() throws IOException { | ||
| 14 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 15 | |||
| 16 | Pagoda.builder() | ||
| 17 | .ontology(Paths.get(ontoDir, "reactome/biopax-level3-processed.owl")) | ||
| 18 | .data(Paths.get(ontoDir, "reactome/data/sample_10.ttl")) | ||
| 19 | .query(Paths.get(ontoDir, "reactome/test.sparql")) | ||
| 20 | .classify(true) | ||
| 21 | .hermit(true) | ||
| 22 | .build() | ||
| 23 | .run(); | ||
| 24 | } | ||
| 25 | |||
| 26 | } | ||
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 d0f0b9a..9fb6cbe 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java | |||
| @@ -87,7 +87,8 @@ public class TestPagodaUOBM { | |||
| 87 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) | 87 | .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) |
| 88 | .classify(true) | 88 | .classify(true) |
| 89 | .hermit(true) | 89 | .hermit(true) |
| 90 | .build().run(); | 90 | .build() |
| 91 | .run(); | ||
| 91 | } | 92 | } |
| 92 | 93 | ||
| 93 | @Test(groups = {"justExecute"}) | 94 | @Test(groups = {"justExecute"}) |
diff --git a/test/uk/ac/ox/cs/pagoda/query/CheckAnswers.java b/test/uk/ac/ox/cs/pagoda/query/CheckAnswers.java index 97e3a57..71730c3 100644 --- a/test/uk/ac/ox/cs/pagoda/query/CheckAnswers.java +++ b/test/uk/ac/ox/cs/pagoda/query/CheckAnswers.java | |||
| @@ -25,8 +25,7 @@ public class CheckAnswers { | |||
| 25 | 25 | ||
| 26 | Gson gson = QueryRecord.GsonCreator.getInstance(); | 26 | Gson gson = QueryRecord.GsonCreator.getInstance(); |
| 27 | 27 | ||
| 28 | Type cqType = new TypeToken<Set<QueryRecord>>() { | 28 | Type cqType = new TypeToken<Set<QueryRecord>>() {}.getType(); |
| 29 | }.getType(); | ||
| 30 | Set<QueryRecord> computedAnswersRecords = gson.fromJson(computedReader, cqType); | 29 | Set<QueryRecord> computedAnswersRecords = gson.fromJson(computedReader, cqType); |
| 31 | Set<QueryRecord> givenAnswersRecords = gson.fromJson(givenReader, cqType); | 30 | Set<QueryRecord> givenAnswersRecords = gson.fromJson(givenReader, cqType); |
| 32 | 31 | ||
