From d81b086fe329fa69891eba0a4b1f73e44183620d Mon Sep 17 00:00:00 2001 From: RncLsn Date: Wed, 20 May 2015 18:52:47 +0100 Subject: Added more tests. Querying of the upper bound is currently unstable. --- .../ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 39 +++++----------------- 1 file changed, 8 insertions(+), 31 deletions(-) (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java') 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 8cbe022..d261d84 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java @@ -11,50 +11,27 @@ import java.nio.file.Paths; public class TestPagodaLUBM { - /** - * Just execute on LUBM 100 - */ - public static void main(String... args) { - new TestPagodaLUBM().justExecute_100(); - } - - public void answersCorrecntess(int number) throws IOException { + public void answersCorrectness(int number) throws IOException { String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); - Path computedAnswers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); - new File(computedAnswers.toString()).deleteOnExit(); + 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/test.sparql")) - .answer(computedAnswers) + .answer(answers) .classify(true) .hermit(true) .build(); - pagoda.run(); - Path givenAnswers = Paths.get(ontoDir, "lubm/lubm" + number + ".json"); - CheckAnswers.assertSameAnswers(computedAnswers, givenAnswers); + pagoda.run(); + CheckAnswers.assertSameAnswers(answers, givenAnswers); } @Test(groups = {"light"}) public void answersCorrectness_1() throws IOException { - answersCorrecntess(1); - } - - /** - * Just execute on LUBM 100 - * */ - public void justExecute_100() { - int number = 100; - String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); - 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/answersCorrectness.sparql")) - .classify(true) - .hermit(true) - .build(); - pagoda.run(); + answersCorrectness(1); } } -- cgit v1.2.3