Skip to content

Commit

Permalink
attempt to have visualization tests passed
Browse files Browse the repository at this point in the history
  • Loading branch information
jstaerk committed Feb 9, 2021
1 parent 2bf48a5 commit a6a7f50
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ public void testVisualizationBasic() {
String result = null;
try {
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
result = zvi.visualize(input.getAbsolutePath());
/* remove file endings so that tests can also pass after checking
out from git with arbitrary options (which may include CSRF changes)
*/
result = zvi.visualize(input.getAbsolutePath()).replace("\r","").replace("\n","");

File expectedResult=getResourceAsFile("factur-x.html");
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8);
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8).replace("\r","").replace("\n","");
// remove linebreaks as well...

BufferedWriter writer = new BufferedWriter(new FileWriter("C:\\Users\\jstaerk\\Desktop\\factur-x.html"));
writer.write(result);
Expand Down

0 comments on commit a6a7f50

Please sign in to comment.