aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java')
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java92
1 files changed, 0 insertions, 92 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
deleted file mode 100644
index 019fafa..0000000
--- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java
+++ /dev/null
@@ -1,92 +0,0 @@
1package uk.ac.ox.cs.pagoda.global_tests;
2
3import org.testng.annotations.Test;
4import uk.ac.ox.cs.pagoda.Pagoda;
5import uk.ac.ox.cs.pagoda.query.CheckAnswers;
6import uk.ac.ox.cs.pagoda.util.TestUtil;
7
8import java.io.File;
9import java.io.IOException;
10import java.nio.file.Path;
11import java.nio.file.Paths;
12
13public class TestPagodaLUBM {
14
15 public void answersCorrectness(int number) throws IOException {
16 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
17 Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
18 new File(answers.toString()).deleteOnExit();
19 Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json");
20
21 Pagoda pagoda = Pagoda.builder()
22 .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl"))
23 .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl"))
24 .query(Paths.get(ontoDir, "lubm/queries/test.sparql"))
25 .answer(answers)
26 .build();
27
28 pagoda.run();
29 CheckAnswers.assertSameAnswers(answers, givenAnswers);
30 }
31
32 @Test(groups = {"light", "correctness"})
33 public void answersCorrectness_1() throws IOException {
34 answersCorrectness(1);
35 }
36
37 public void justExecute_sygenia(int number) throws IOException {
38 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
39// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
40// new File(answers.toString()).deleteOnExit();
41// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json");
42
43 Pagoda pagoda = Pagoda.builder()
44 .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl"))
45 .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl"))
46 .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia.sparql"))
47// .answer(answers)
48 .build();
49
50 pagoda.run();
51// CheckAnswers.assertSameAnswers(answers, givenAnswers);
52 }
53
54 @Test(groups = {"sygenia"})
55 public void justExecute_sygenia_1() throws IOException {
56 justExecute_sygenia(1);
57 }
58
59 public void justExecute_sygenia_allBlanks(int number) throws IOException {
60 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
61// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath());
62// new File(answers.toString()).deleteOnExit();
63// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json");
64
65 Pagoda pagoda = Pagoda.builder()
66 .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl"))
67 .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl"))
68 .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia_all-blanks.sparql"))
69// .answer(answers)
70 .build();
71
72 pagoda.run();
73// CheckAnswers.assertSameAnswers(answers, givenAnswers);
74 }
75
76 @Test(groups = {"sygenia"})
77 public void justExecute_sygenia_1_allBlanks() throws IOException {
78 justExecute_sygenia_allBlanks(1);
79 }
80
81 @Test(groups = {"existential"})
82 public void justExecute_feier() throws IOException {
83 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
84
85 Pagoda.builder()
86 .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl"))
87 .data(Paths.get(ontoDir, "lubm/data/lubm1.ttl"))
88 .query(Paths.get(ontoDir, "lubm/queries/queries_from_rules.sparql"))
89 .build()
90 .run();
91 }
92}