aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/global_tests/PagodaUOBM.java
diff options
context:
space:
mode:
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.java53
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 @@
1package uk.ac.ox.cs.pagoda.global_tests;
2
3import org.testng.annotations.DataProvider;
4import org.testng.annotations.Test;
5import uk.ac.ox.cs.pagoda.tester.PagodaTester;
6import uk.ac.ox.cs.pagoda.util.TestUtil;
7
8import java.io.IOException;
9import java.nio.file.Paths;
10
11import static uk.ac.ox.cs.pagoda.util.TestUtil.combinePaths;
12
13public 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}