@Test public void loadTemplate() throws Exception { TemplateSetLoader loader = new FileTemplateSetLoader(tempPath.toFile()); Template template = loader.loadTemplate("simple/simple.txt.ftl"); StringWriter writer = new StringWriter(); template.process(Collections.singletonMap("name", "world"), writer); writer.close(); assertEquals("Hello, world!" + System.lineSeparator(), writer.toString()); }
@Override protected Template loadTemplate(String path) throws IOException { return configuration.getTemplate(path); }
FileTemplateSetLoader extends TemplateSetLoader { @Override protected Template loadTemplate(String path) throws IOException { return configuration.getTemplate(path); } }
FileTemplateSetLoader extends TemplateSetLoader { @Override protected Template loadTemplate(String path) throws IOException { return configuration.getTemplate(path); } FileTemplateSetLoader(File root); }
FileTemplateSetLoader extends TemplateSetLoader { @Override protected Template loadTemplate(String path) throws IOException { return configuration.getTemplate(path); } FileTemplateSetLoader(File root); @Override TemplateSet load(); File getRoot(); }
FileTemplateSetLoader extends TemplateSetLoader { @Override protected Template loadTemplate(String path) throws IOException { return configuration.getTemplate(path); } FileTemplateSetLoader(File root); @Override TemplateSet load(); File getRoot();  }