use of org.thymeleaf.templateresolver.FileTemplateResolver in project thymeleaf-tests by thymeleaf.
the class TemplateEngineTest method testTemplateResolverConfiguration04.
@Test
public void testTemplateResolverConfiguration04() {
final TemplateEngine templateEngine = new TemplateEngine();
templateEngine.setTemplateResolver(new ClassLoaderTemplateResolver());
templateEngine.setTemplateResolver(new FileTemplateResolver());
templateEngine.initialize();
final List<ITemplateResolver> templateResolvers = new ArrayList<ITemplateResolver>(templateEngine.getTemplateResolvers());
Assert.assertEquals(1, templateResolvers.size());
Assert.assertEquals("org.thymeleaf.templateresolver.FileTemplateResolver", templateResolvers.get(0).getName());
}
use of org.thymeleaf.templateresolver.FileTemplateResolver in project thymeleaf-tests by thymeleaf.
the class TemplateEngineTest method testTemplateResolverConfiguration09.
@Test
public void testTemplateResolverConfiguration09() {
final TemplateEngine templateEngine = new TemplateEngine();
final Set<ITemplateResolver> resolvers = new LinkedHashSet<ITemplateResolver>();
resolvers.add(new ClassLoaderTemplateResolver());
resolvers.add(new FileTemplateResolver());
templateEngine.setTemplateResolvers(resolvers);
templateEngine.initialize();
final List<ITemplateResolver> templateResolvers = new ArrayList<ITemplateResolver>(templateEngine.getTemplateResolvers());
Assert.assertEquals(2, templateResolvers.size());
Assert.assertEquals("org.thymeleaf.templateresolver.ClassLoaderTemplateResolver", templateResolvers.get(0).getName());
Assert.assertEquals("org.thymeleaf.templateresolver.FileTemplateResolver", templateResolvers.get(1).getName());
}
use of org.thymeleaf.templateresolver.FileTemplateResolver in project thymeleaf-tests by thymeleaf.
the class TemplateEngineTest method testTemplateResolverConfiguration08.
@Test
public void testTemplateResolverConfiguration08() {
final TemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(new ClassLoaderTemplateResolver());
templateEngine.addTemplateResolver(new FileTemplateResolver());
templateEngine.initialize();
final List<ITemplateResolver> templateResolvers = new ArrayList<ITemplateResolver>(templateEngine.getTemplateResolvers());
Assert.assertEquals(2, templateResolvers.size());
Assert.assertEquals("org.thymeleaf.templateresolver.ClassLoaderTemplateResolver", templateResolvers.get(0).getName());
Assert.assertEquals("org.thymeleaf.templateresolver.FileTemplateResolver", templateResolvers.get(1).getName());
}
use of org.thymeleaf.templateresolver.FileTemplateResolver in project thymeleaf-tests by thymeleaf.
the class TemplateEngineTest method testTemplateResolverConfiguration06.
@Test
public void testTemplateResolverConfiguration06() {
final TemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.setTemplateResolver(new ClassLoaderTemplateResolver());
templateEngine.addTemplateResolver(new FileTemplateResolver());
templateEngine.initialize();
final List<ITemplateResolver> templateResolvers = new ArrayList<ITemplateResolver>(templateEngine.getTemplateResolvers());
Assert.assertEquals(2, templateResolvers.size());
Assert.assertEquals("org.thymeleaf.templateresolver.ClassLoaderTemplateResolver", templateResolvers.get(0).getName());
Assert.assertEquals("org.thymeleaf.templateresolver.FileTemplateResolver", templateResolvers.get(1).getName());
}
use of org.thymeleaf.templateresolver.FileTemplateResolver in project thymeleaf-tests by thymeleaf.
the class TemplateEngineTest method testTemplateResolverConfiguration07.
@Test
public void testTemplateResolverConfiguration07() {
final TemplateEngine templateEngine = new TemplateEngine();
templateEngine.addTemplateResolver(new ClassLoaderTemplateResolver());
templateEngine.addTemplateResolver(new FileTemplateResolver());
templateEngine.initialize();
final List<ITemplateResolver> templateResolvers = new ArrayList<ITemplateResolver>(templateEngine.getTemplateResolvers());
Assert.assertEquals(2, templateResolvers.size());
Assert.assertEquals("org.thymeleaf.templateresolver.ClassLoaderTemplateResolver", templateResolvers.get(0).getName());
Assert.assertEquals("org.thymeleaf.templateresolver.FileTemplateResolver", templateResolvers.get(1).getName());
}
Aggregations