Search in sources :

Example 1 with ConditionalCommentsDialect

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

the class SpringBase30Test 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:engine30/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)

Example 2 with ConditionalCommentsDialect

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

the class SpringBase20Test 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:engine20/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)

Example 3 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:engine21/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 4 with ConditionalCommentsDialect

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

the class ConditionalCommentsTest method testConditionalComments01.

@Test
public void testConditionalComments01() throws Exception {
    final TestExecutor executor = new TestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new ConditionalCommentsDialect() }));
    executor.execute("classpath:engine30/conditionalcomments/conditionalcomments01.thtest");
    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 5 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:engine20/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)

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