Skip to content

Commit

Permalink
Adds test for template with deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Schlecht committed Mar 3, 2025
1 parent 0e39e34 commit 7cd0a95
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jte/src/test/java/gg/jte/TemplateEngineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ void helloWorld() {
thenOutputIs("Hello World");
}

@Test
void helloWorldWithDeprecatedMethodCall() {
givenRawTemplate("@param gg.jte.TemplateEngineTest.Model model\n${model.getAnotherWorld()} ${model.deprecatedMethod()}");
thenOutputIs("Another World true");
}


@Test
void templateWithoutParameters() {
givenRawTemplate("Hello World!");
Expand Down Expand Up @@ -1580,6 +1587,8 @@ private void thenOutputIs(String expected) {
return assertThat(throwable).isInstanceOf(TemplateException.class);
}



@SuppressWarnings("SameParameterValue")
private void thenRenderingFailsWithExceptionCausedBy(Class<? extends Throwable> clazz) {
thenRenderingFailsWithException().hasCauseInstanceOf(clazz);
Expand Down

0 comments on commit 7cd0a95

Please # to comment.