Fix testSourceUri generation

This commit is contained in:
Andreas Dangel
2022-04-29 17:38:48 +02:00
parent 10590a27c4
commit d7a673dec0
2 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ public abstract class RuleTst {
Element root = doc.getDocumentElement();
NodeList testCodes = root.getElementsByTagName("test-code");
String absolutePathToTestXmlFile = new File(".").getAbsolutePath() + "/src/test/resources/"
String absolutePathToTestXmlFile = new File(".").getAbsoluteFile().toURI() + "/src/test/resources/"
+ this.getClass().getPackage().getName().replaceAll("\\.", "/")
+ "/" + testXmlFileName;

View File

@ -168,7 +168,7 @@ public class TestDescriptor {
}
public void setTestSourceUri(String absolutePath, int line) {
this.testSourceUri = URI.create("file:" + absolutePath + "?line=" + line);
this.testSourceUri = URI.create(absolutePath + "?line=" + line);
}
public URI getTestSourceUri() {