Skip to content

Commit

Permalink
Merge pull request #3 from TiloW/windows-paths
Browse files Browse the repository at this point in the history
Paths adapted for Windows
  • Loading branch information
TiloW committed Oct 12, 2014
2 parents cc590bf + 5b1fe44 commit 12a6516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/test/java/proof/ResourceBasedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ protected JSONObject loadJSON(String filename) {
String result = null;

try {
String path = getClass().getResource("/" + directory + "/" + filename + ".json").getPath();
result = new String(Files.readAllBytes(Paths.get(path)));
result =
new String(Files.readAllBytes(Paths.get("build/resources/test/" + directory + "/"
+ filename + ".json")));
} catch (IOException | NullPointerException e) {
fail("Could not read ressource: " + filename);
}
Expand Down
5 changes: 1 addition & 4 deletions src/test/java/proof/validator/MainValidatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;

import org.json.JSONObject;
Expand All @@ -24,9 +23,7 @@ public MainValidatorTest(File logFile) {

@Parameterized.Parameters
public static File[] getFiles() throws URISyntaxException {
URL url = MainValidatorTest.class.getResource("../../../../resources/test/log");

File dir = new File(url.toURI());
File dir = new File("build/resources/test/log");

return dir.listFiles();
}
Expand Down

0 comments on commit 12a6516

Please sign in to comment.