diff options
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java new file mode 100644 index 0000000..065fb29 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.global_tests; | ||
| 2 | |||
| 3 | import org.testng.annotations.DataProvider; | ||
| 4 | import org.testng.annotations.Test; | ||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | import uk.ac.ox.cs.pagoda.util.TestUtil; | ||
| 7 | |||
| 8 | import java.io.IOException; | ||
| 9 | import java.nio.file.Paths; | ||
| 10 | |||
| 11 | import static uk.ac.ox.cs.pagoda.util.TestUtil.combinePaths; | ||
| 12 | |||
| 13 | public class PagodaUOBM { | ||
| 14 | |||
| 15 | private void testN(int number ) throws IOException { | ||
| 16 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 17 | TestGlobalCorrectness.test(Paths.get(ontoDir, "uobm/univ-bench-dl.owl"), | ||
| 18 | Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl"), | ||
| 19 | Paths.get(ontoDir, "uobm/queries/test.sparql"), | ||
| 20 | Paths.get(ontoDir, "uobm/uobm" + number + ".json")); | ||
| 21 | } | ||
| 22 | |||
| 23 | @Test | ||
| 24 | public void test1() throws IOException { | ||
| 25 | testN(1); | ||
| 26 | } | ||
| 27 | |||
| 28 | private static final int N_1 = 8; | ||
| 29 | private static final int N_2 = 10; | ||
| 30 | |||
| 31 | |||
| 32 | @DataProvider(name = "uobmNumbers") | ||
| 33 | public static Object[][] uobmNumbers() { | ||
| 34 | Integer[][] integers = new Integer[N_2 - N_1 + 1][1]; | ||
| 35 | for (int i = 0; i < N_2 - N_1 + 1; i++) | ||
| 36 | integers[i][0]= N_1 + i; | ||
| 37 | return integers; | ||
| 38 | } | ||
| 39 | |||
| 40 | // @Test | ||
| 41 | // public void justExecute3() { | ||
| 42 | // justExecute(1); | ||
| 43 | // } | ||
| 44 | |||
| 45 | @Test(dataProvider = "uobmNumbers") | ||
| 46 | public void justExecute(int number) { | ||
| 47 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 48 | PagodaTester.main(combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), | ||
| 49 | combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), | ||
| 50 | combinePaths(ontoDir, "uobm/queries/test.sparql")); | ||
| 51 | } | ||
| 52 | |||
| 53 | } | ||
