use of groovy.text.TemplateEngine in project spring-framework by spring-projects.
the class GroovyMarkupViewTests method customTemplateEngine.
@Test
public void customTemplateEngine() throws Exception {
GroovyMarkupView view = new GroovyMarkupView();
view.setTemplateEngine(new TestTemplateEngine());
view.setApplicationContext(this.webAppContext);
DirectFieldAccessor accessor = new DirectFieldAccessor(view);
TemplateEngine engine = (TemplateEngine) accessor.getPropertyValue("engine");
assertThat(engine).isNotNull();
assertThat(engine.getClass()).isEqualTo(TestTemplateEngine.class);
}
Aggregations