@Test public void test_render() throws Exception { String templateVariable = "Hello Jade!"; Map<String, Object> model = new HashMap<>(); model.put("message", templateVariable); String expected = String.format("<h1>%s</h1>", templateVariable); String actual = new JadeTemplateEngine().render(new ModelAndView(model, "hello.jade")); assertEquals(expected, actual); }
@Override @SuppressWarnings("unchecked") public String render(ModelAndView modelAndView) { try { JadeTemplate template = configuration.getTemplate(modelAndView.getViewName()); return configuration.renderTemplate(template, (Map<String, Object>) modelAndView.getModel()); } catch (IOException e) { throw new IllegalArgumentException(e); } }
JadeTemplateEngine extends TemplateEngine { @Override @SuppressWarnings("unchecked") public String render(ModelAndView modelAndView) { try { JadeTemplate template = configuration.getTemplate(modelAndView.getViewName()); return configuration.renderTemplate(template, (Map<String, Object>) modelAndView.getModel()); } catch (IOException e) { throw new IllegalArgumentException(e); } } }
JadeTemplateEngine extends TemplateEngine { @Override @SuppressWarnings("unchecked") public String render(ModelAndView modelAndView) { try { JadeTemplate template = configuration.getTemplate(modelAndView.getViewName()); return configuration.renderTemplate(template, (Map<String, Object>) modelAndView.getModel()); } catch (IOException e) { throw new IllegalArgumentException(e); } } JadeTemplateEngine();  JadeTemplateEngine(String templateRoot);  JadeTemplateEngine(JadeConfiguration configuration); }
JadeTemplateEngine extends TemplateEngine { @Override @SuppressWarnings("unchecked") public String render(ModelAndView modelAndView) { try { JadeTemplate template = configuration.getTemplate(modelAndView.getViewName()); return configuration.renderTemplate(template, (Map<String, Object>) modelAndView.getModel()); } catch (IOException e) { throw new IllegalArgumentException(e); } } JadeTemplateEngine();  JadeTemplateEngine(String templateRoot);  JadeTemplateEngine(JadeConfiguration configuration); JadeConfiguration configuration(); @Override @SuppressWarnings("unchecked") String render(ModelAndView modelAndView); }
JadeTemplateEngine extends TemplateEngine { @Override @SuppressWarnings("unchecked") public String render(ModelAndView modelAndView) { try { JadeTemplate template = configuration.getTemplate(modelAndView.getViewName()); return configuration.renderTemplate(template, (Map<String, Object>) modelAndView.getModel()); } catch (IOException e) { throw new IllegalArgumentException(e); } } JadeTemplateEngine();  JadeTemplateEngine(String templateRoot);  JadeTemplateEngine(JadeConfiguration configuration); JadeConfiguration configuration(); @Override @SuppressWarnings("unchecked") String render(ModelAndView modelAndView);  }