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. --- test/uk/ac/ox/cs/pagoda/util/TestUtil.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/uk/ac/ox/cs/pagoda/util') diff --git a/test/uk/ac/ox/cs/pagoda/util/TestUtil.java b/test/uk/ac/ox/cs/pagoda/util/TestUtil.java index ad0d494..c3909d5 100644 --- a/test/uk/ac/ox/cs/pagoda/util/TestUtil.java +++ b/test/uk/ac/ox/cs/pagoda/util/TestUtil.java @@ -7,7 +7,9 @@ import org.apache.log4j.Logger; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.net.URL; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.Enumeration; import java.util.Properties; @@ -62,4 +64,11 @@ public class TestUtil { return null; } + public static Path getAnswersFilePath(String name) { + URL givenAnswersURL = TestUtil.class.getClassLoader() + .getResource(name); + if(givenAnswersURL == null) throw new RuntimeException("Missing answers file:" + name); + return Paths.get(givenAnswersURL.getPath()); + } + } -- cgit v1.2.3