Skip to content

Commit

Permalink
#426 Fix test problem
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Nov 15, 2023
1 parent c517ec5 commit 4dc2943
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.Properties;

public class FacadeIRIParserTest {
Expand Down Expand Up @@ -108,11 +109,11 @@ public void specialCharsArgs() {

@Test
public void specialCharsArgsFromFile() throws IOException {
String uri = IOUtils
.toString(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("./exampleIRI.txt")));
String uri = IOUtils.toString(new InputStreamReader(Objects.requireNonNull(getClass().getClassLoader().getResourceAsStream("./exampleIRI.txt"))));
String expected = IOUtils.toString(new InputStreamReader(Objects.requireNonNull(getClass().getClassLoader().getResourceAsStream("./expected.txt"))));
Properties p = new FacadeIRIParser(uri).getProperties();
Assert.assertEquals(p.get("location"), "https://myfile.json?fo,o=bar&tab=goal#hack");
Assert.assertEquals(p.get("same"), "汉字");
Assert.assertEquals("https://myfile.json?fo,o=bar&tab=goal#hack", p.get("location"));
Assert.assertEquals(expected, p.get("same" ));
}

@Test
Expand Down
1 change: 1 addition & 0 deletions sparql-anything-parser/src/test/resources/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
汉字

0 comments on commit 4dc2943

Please sign in to comment.