From 9c9434162daf7c25dda9e9ff188ab90eb65f1fb1 Mon Sep 17 00:00:00 2001 From: RncLsn Date: Thu, 4 Jun 2015 12:34:11 +0100 Subject: New queries for LUBM and UOBM, automatically generated by SyGENiA. --- test/resources/LightTests.xml | 6 +-- test/resources/SygeniaTests.xml | 20 +++++++++ .../ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 48 ++++++++++++++++++++ .../ox/cs/pagoda/global_tests/TestPagodaUOBM.java | 52 ++++++++++++++++++++++ 4 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 test/resources/SygeniaTests.xml (limited to 'test') diff --git a/test/resources/LightTests.xml b/test/resources/LightTests.xml index 9b9eee4..92edb48 100644 --- a/test/resources/LightTests.xml +++ b/test/resources/LightTests.xml @@ -10,10 +10,10 @@ - - + + - + \ No newline at end of file diff --git a/test/resources/SygeniaTests.xml b/test/resources/SygeniaTests.xml new file mode 100644 index 0000000..01c4eab --- /dev/null +++ b/test/resources/SygeniaTests.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java index 1db4a43..089a7d2 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java @@ -35,4 +35,52 @@ public class TestPagodaLUBM { public void answersCorrectness_1() throws IOException { answersCorrectness(1); } + + public void justExecute_sygenia(int number) throws IOException { + String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); +// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); +// new File(answers.toString()).deleteOnExit(); +// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json"); + + Pagoda pagoda = Pagoda.builder() + .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) + .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) + .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia.sparql")) +// .answer(answers) + .classify(true) + .hermit(true) + .build(); + + pagoda.run(); +// CheckAnswers.assertSameAnswers(answers, givenAnswers); + } + + @Test(groups = {"sygenia"}) + public void justExecute_sygenia_1() throws IOException { + justExecute_sygenia(1); + } + + public void justExecute_sygenia_allBlanks(int number) throws IOException { + String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); +// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); +// new File(answers.toString()).deleteOnExit(); +// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json"); + + Pagoda pagoda = Pagoda.builder() + .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) + .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) + .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia_all-blanks.sparql")) +// .answer(answers) + .classify(true) + .hermit(true) + .build(); + + pagoda.run(); +// CheckAnswers.assertSameAnswers(answers, givenAnswers); + } + + @Test(groups = {"sygenia"}) + public void justExecute_sygenia_1_allBlanks() throws IOException { + justExecute_sygenia_allBlanks(1); + } } 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 4f49fe0..d05e3b1 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaUOBM.java @@ -48,5 +48,57 @@ public class TestPagodaUOBM { pagoda.run(); CheckAnswers.assertSameAnswers(answers, givenAnswers); } + + @Test(groups = {"sygenia"}) + public void answersCorrectness_sygenia_1() throws IOException { + answersCorrectness_sygenia(1); + } + + @Test(groups = {"heavy",}, dataProvider = "UOBMNumbers") + public void answersCorrectness_sygenia(int number) throws IOException { + String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); +// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); +// new File(answers.toString()).deleteOnExit(); +// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-uobm" + number + ".json"); + + Pagoda pagoda = Pagoda.builder() + .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) + .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) + .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia.sparql")) +// .answer(answers) + .classify(true) + .hermit(true) + .build(); + + pagoda.run(); +// CheckAnswers.assertSameAnswers(answers, givenAnswers); + } + + @Test(groups = {"sygenia"}) + public void answersCorrectness_sygenia_allBlanks_1() throws IOException { + answersCorrectness_sygenia(1); + } + + @Test(groups = {"heavy",}, dataProvider = "UOBMNumbers") + public void answersCorrectness_sygenia_allBlanks(int number) throws IOException { + String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); +// Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); +// new File(answers.toString()).deleteOnExit(); +// Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-uobm" + number + ".json"); + + Pagoda pagoda = Pagoda.builder() + .ontology(Paths.get(ontoDir, "uobm/univ-bench-dl.owl")) + .data(Paths.get(ontoDir, "uobm/data/uobm" + number + ".ttl")) + .query(Paths.get(ontoDir, "uobm/queries/uobm_sygenia_all-blanks.sparql")) +// .answer(answers) + .classify(true) + .hermit(true) + .build(); + + pagoda.run(); +// CheckAnswers.assertSameAnswers(answers, givenAnswers); + } + + } -- cgit v1.2.3