diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 19:06:04 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 19:06:04 +0100 |
| commit | 7a68441a541b12b22587fb53072193e1130049ff (patch) | |
| tree | e05f826da89e73a7f961c505359f4135cca646a8 /test/uk/ac/ox/cs/pagoda/global_tests | |
| parent | 612729386b645b120f8397a007cd8421986af0ad (diff) | |
| download | ACQuA-7a68441a541b12b22587fb53072193e1130049ff.tar.gz ACQuA-7a68441a541b12b22587fb53072193e1130049ff.zip | |
Deleted unused classes.
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java | 22 |
1 files changed, 12 insertions, 10 deletions
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 23d79ab..0956ee8 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java | |||
| @@ -3,7 +3,6 @@ package uk.ac.ox.cs.pagoda.global_tests; | |||
| 3 | import org.testng.annotations.DataProvider; | 3 | import org.testng.annotations.DataProvider; |
| 4 | import org.testng.annotations.Test; | 4 | import org.testng.annotations.Test; |
| 5 | import uk.ac.ox.cs.pagoda.Pagoda; | 5 | import uk.ac.ox.cs.pagoda.Pagoda; |
| 6 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 7 | import uk.ac.ox.cs.pagoda.util.TestUtil; | 6 | import uk.ac.ox.cs.pagoda.util.TestUtil; |
| 8 | 7 | ||
| 9 | import java.io.File; | 8 | import java.io.File; |
| @@ -11,16 +10,13 @@ import java.io.IOException; | |||
| 11 | import java.nio.file.Path; | 10 | import java.nio.file.Path; |
| 12 | import java.nio.file.Paths; | 11 | import java.nio.file.Paths; |
| 13 | 12 | ||
| 14 | import static uk.ac.ox.cs.pagoda.util.TestUtil.combinePaths; | ||
| 15 | |||
| 16 | public class TestPagodaUOBM { | 13 | public class TestPagodaUOBM { |
| 17 | 14 | ||
| 18 | |||
| 19 | private static final int N_1 = 1; | 15 | private static final int N_1 = 1; |
| 20 | private static final int N_2 = 10; | 16 | private static final int N_2 = 10; |
| 21 | 17 | ||
| 22 | @DataProvider(name = "uobmNumbers") | 18 | @DataProvider(name = "UOBMNumbers") |
| 23 | public static Object[][] uobmNumbers() { | 19 | private static Object[][] UOBMNumbers() { |
| 24 | Integer[][] integers = new Integer[N_2 - N_1 + 1][1]; | 20 | Integer[][] integers = new Integer[N_2 - N_1 + 1][1]; |
| 25 | for(int i = 0; i < N_2 - N_1 + 1; i++) | 21 | for(int i = 0; i < N_2 - N_1 + 1; i++) |
| 26 | integers[i][0] = N_1 + i; | 22 | integers[i][0] = N_1 + i; |
| @@ -42,6 +38,7 @@ public class TestPagodaUOBM { | |||
| 42 | .build(); | 38 | .build(); |
| 43 | pagoda.run(); | 39 | pagoda.run(); |
| 44 | 40 | ||
| 41 | // TODO use HermitReasoner for computing correct answers if they are missing | ||
| 45 | String given_answers = "uobm/uobm" + number + ".json"; | 42 | String given_answers = "uobm/uobm" + number + ".json"; |
| 46 | CheckAnswers.assertSameAnswers(computedAnswers, Paths.get(ontoDir, given_answers)); | 43 | CheckAnswers.assertSameAnswers(computedAnswers, Paths.get(ontoDir, given_answers)); |
| 47 | } | 44 | } |
| @@ -51,12 +48,17 @@ public class TestPagodaUOBM { | |||
| 51 | answersCorrectness(1); | 48 | answersCorrectness(1); |
| 52 | } | 49 | } |
| 53 | 50 | ||
| 54 | @Test(groups = {"heavy"}, dataProvider = "uobmNumbers") | 51 | @Test(groups = {"heavy"}, dataProvider = "UOBMNumbers") |
| 55 | public void justExecute(int number) { | 52 | public void justExecute(int number) { |
| 56 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | 53 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); |
| 57 | PagodaTester.main(combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), | 54 | Pagoda pagoda = Pagoda.builder() |
| 58 | combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), | 55 | .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) |
| 59 | combinePaths(ontoDir, "uobm/queries/answersCorrectness.sparql")); | 56 | .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) |
| 57 | .query(Paths.get(ontoDir, "uobm/queries/test.sparql")) | ||
| 58 | .classify(true) | ||
| 59 | .hermit(true) | ||
| 60 | .build(); | ||
| 61 | pagoda.run(); | ||
| 60 | } | 62 | } |
| 61 | 63 | ||
| 62 | } | 64 | } |
