Search in sources :

Example 21 with StandardDialect

use of org.thymeleaf.standard.StandardDialect in project thymeleaf-tests by thymeleaf.

the class ElementProcessorsTest method testDialectPrecedenceTagSame.

@Test
public void testDialectPrecedenceTagSame() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new PrecedenceDialect(StandardDialect.PROCESSOR_PRECEDENCE) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/elementprocessors/precedencetagsame");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) PrecedenceDialect(org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 22 with StandardDialect

use of org.thymeleaf.standard.StandardDialect in project thymeleaf-tests by thymeleaf.

the class ElementProcessorsTest method testDialectPrecedenceModelAfter.

@Test
public void testDialectPrecedenceModelAfter() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new PrecedenceDialect(StandardDialect.PROCESSOR_PRECEDENCE + 1) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/elementprocessors/precedencemodelafter");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) PrecedenceDialect(org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 23 with StandardDialect

use of org.thymeleaf.standard.StandardDialect in project thymeleaf-tests by thymeleaf.

the class ElementProcessorsTest method testDialectPrecedenceModelBefore.

@Test
public void testDialectPrecedenceModelBefore() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new PrecedenceDialect(StandardDialect.PROCESSOR_PRECEDENCE - 1) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/elementprocessors/precedencemodelbefore");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) PrecedenceDialect(org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 24 with StandardDialect

use of org.thymeleaf.standard.StandardDialect in project thymeleaf-tests by thymeleaf.

the class ElementProcessorsTest method testDialectPrecedenceTagAfter.

@Test
public void testDialectPrecedenceTagAfter() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new PrecedenceDialect(StandardDialect.PROCESSOR_PRECEDENCE + 1) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/elementprocessors/precedencetagafter");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) PrecedenceDialect(org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 25 with StandardDialect

use of org.thymeleaf.standard.StandardDialect in project thymeleaf-tests by thymeleaf.

the class ElementProcessorsTest method testDialectPrecedenceModelSame.

@Test
public void testDialectPrecedenceModelSame() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setDialects(Arrays.asList(new IDialect[] { new StandardDialect(), new PrecedenceDialect(StandardDialect.PROCESSOR_PRECEDENCE) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/elementprocessors/precedencemodelsame");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) PrecedenceDialect(org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect) StandardDialect(org.thymeleaf.standard.StandardDialect) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Aggregations

StandardDialect (org.thymeleaf.standard.StandardDialect)37 IDialect (org.thymeleaf.dialect.IDialect)36 Test (org.junit.Test)34 TestExecutor (org.thymeleaf.testing.templateengine.engine.TestExecutor)34 PrecedenceDialect (org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect)6 ConditionalCommentsDialect (org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect)4 TemplateBoundariesDialect (org.thymeleaf.templateengine.templateboundaries.dialect.TemplateBoundariesDialect)3 ArrayList (java.util.ArrayList)1 EnumMap (java.util.EnumMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 DialectConfiguration (org.thymeleaf.DialectConfiguration)1 EngineConfiguration (org.thymeleaf.EngineConfiguration)1 IEngineConfiguration (org.thymeleaf.IEngineConfiguration)1 ITemplateEngine (org.thymeleaf.ITemplateEngine)1 TemplateEngine (org.thymeleaf.TemplateEngine)1