Search in sources :

Example 6 with ConditionalCommentsDialect

use of org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect in project thymeleaf-tests by thymeleaf.

the class ConditionalCommentsTest method testConditionalComments.

@Test
public void testConditionalComments() throws Exception {
    final TestExecutor executor = new TestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new ConditionalCommentsDialect() }));
    executor.execute("classpath:engine30/conditionalcomments");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) ConditionalCommentsDialect(org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect) Test(org.junit.Test)

Example 7 with ConditionalCommentsDialect

use of org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect in project thymeleaf-tests by thymeleaf.

the class SpringBase21Test method testSpringBaseConditionalComments.

@Test
public void testSpringBaseConditionalComments() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation(null);
    final TestExecutor executor = new TestExecutor();
    executor.setProcessingContextBuilder(contextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new ConditionalCommentsDialect() }));
    executor.execute("classpath:engine21/springbase/springbaseconditionalcomments.thindex");
    Assert.assertTrue(executor.isAllOK());
}
Also used : SpringWebProcessingContextBuilder(org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder) TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) IDialect(org.thymeleaf.dialect.IDialect) ConditionalCommentsDialect(org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 IDialect (org.thymeleaf.dialect.IDialect)7 ConditionalCommentsDialect (org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect)7 TestExecutor (org.thymeleaf.testing.templateengine.engine.TestExecutor)7 StandardDialect (org.thymeleaf.standard.StandardDialect)4 SpringWebProcessingContextBuilder (org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder)3