diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-07 19:26:24 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-07 19:26:24 +0100 |
| commit | 5be5fd3daa0d50980fb3791e904e035cdbca254f (patch) | |
| tree | 8109fdd92d6a8f3b59b47f147d21e23b84301494 /test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java | |
| parent | 11a432bfc3cb11e07c68c4298fcec060ff1e25fa (diff) | |
| download | ACQuA-5be5fd3daa0d50980fb3791e904e035cdbca254f.tar.gz ACQuA-5be5fd3daa0d50980fb3791e904e035cdbca254f.zip | |
Making the output machine-readable (JSON).
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java index 8fbe793..5f89162 100644 --- a/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/PagodaNPD.java | |||
| @@ -1,43 +1,44 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.test_units; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import static org.junit.Assert.fail; | ||
| 4 | |||
| 5 | import org.junit.Test; | 3 | import org.junit.Test; |
| 6 | |||
| 7 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 4 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 8 | import uk.ac.ox.cs.pagoda.tester.Statistics; | 5 | import uk.ac.ox.cs.pagoda.tester.Statistics; |
| 9 | import uk.ac.ox.cs.pagoda.util.Utility; | 6 | import uk.ac.ox.cs.pagoda.util.TestUtil; |
| 10 | 7 | ||
| 11 | import java.io.IOException; | 8 | import java.io.IOException; |
| 12 | 9 | ||
| 10 | import static org.junit.Assert.fail; | ||
| 11 | |||
| 13 | public class PagodaNPD { | 12 | public class PagodaNPD { |
| 14 | 13 | ||
| 15 | @Test | 14 | @Test |
| 16 | public void testNPDwithoutDataType() throws IOException { | 15 | public void testNPDwithoutDataType() throws IOException { |
| 16 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 17 | PagodaTester.main( | 17 | PagodaTester.main( |
| 18 | PagodaTester.onto_dir + "npd/npd-all-minus-datatype.owl", | 18 | TestUtil.combinePaths(ontoDir, "npd/npd-all-minus-datatype.owl"), |
| 19 | PagodaTester.onto_dir + "npd/data/npd-data-dump-minus-datatype-new.ttl", | 19 | TestUtil.combinePaths(ontoDir, "npd/data/npd-data-dump-minus-datatype-new.ttl"), |
| 20 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | 20 | TestUtil.combinePaths(ontoDir, "npd/queries/atomic.sparql") |
| 21 | ); | 21 | ); |
| 22 | 22 | ||
| 23 | Statistics stat = new Statistics("output/log4j.log"); | 23 | Statistics stat = new Statistics("output/log4j.log"); |
| 24 | String diff = stat.diff("results-backup/benchmark/npd_minus.out"); | 24 | String diff = stat.diff("results-backup/benchmark/npd_minus.out"); |
| 25 | Utility.copyFile("output/log4j.log", "results-backup/current/npd_minus.out"); | 25 | TestUtil.copyFile("output/log4j.log", "results-backup/current/npd_minus.out"); |
| 26 | if (!diff.isEmpty()) | 26 | if (!diff.isEmpty()) |
| 27 | fail(diff); | 27 | fail(diff); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | @Test | 30 | @Test |
| 31 | public void testNPD() throws IOException { | 31 | public void testNPD() throws IOException { |
| 32 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 32 | PagodaTester.main( | 33 | PagodaTester.main( |
| 33 | PagodaTester.onto_dir + "npd/npd-all.owl", | 34 | TestUtil.combinePaths(ontoDir, "npd/npd-all.owl"), |
| 34 | PagodaTester.onto_dir + "npd/data/npd-data-dump-processed.ttl", | 35 | TestUtil.combinePaths(ontoDir, "npd/data/npd-data-dump-processed.ttl"), |
| 35 | PagodaTester.onto_dir + "npd/queries/atomic.sparql" | 36 | TestUtil.combinePaths(ontoDir, "npd/queries/atomic.sparql") |
| 36 | ); | 37 | ); |
| 37 | 38 | ||
| 38 | Statistics stat = new Statistics("output/log4j.log"); | 39 | Statistics stat = new Statistics("output/log4j.log"); |
| 39 | String diff = stat.diff("results-backup/benchmark/npd.out"); | 40 | String diff = stat.diff("results-backup/benchmark/npd.out"); |
| 40 | Utility.copyFile("output/log4j.log", "results-backup/current/npd.out"); | 41 | TestUtil.copyFile("output/log4j.log", "results-backup/current/npd.out"); |
| 41 | if (!diff.isEmpty()) | 42 | if (!diff.isEmpty()) |
| 42 | fail(diff); | 43 | fail(diff); |
| 43 | } | 44 | } |
