Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdennett committed Feb 7, 2021
1 parent f02e5a4 commit 77ed55d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/com/severell/plugins/jte/ViewJteDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ public void testJteDriverPrintWriter() throws ViewException {
assertEquals("<html><body>Hello</body></html>", st.toString());
}

@Test
public void testJteDriverStringWriter() throws ViewException {
ViewJteDriver driver = new ViewJteDriver(Path.of("src", "test", "resources"));
StringWriter st = new StringWriter();
HashMap<String, Object> map = new HashMap<>();

driver.render("test.jte",map , st);
st.flush();
assertEquals("<html><body>Hello</body></html>", st.toString());
}

@Test
public void testJteDriverThrowsIOError() throws IOException {
ViewJteDriver driver = new ViewJteDriver();
Expand Down

0 comments on commit 77ed55d

Please sign in to comment.