Search in sources :

Example 1 with StandardDialect

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

the class ElementProcessorsTest method testDialectPrecedenceTagBefore.

@Test
public void testDialectPrecedenceTagBefore() 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/precedencetagbefore");
    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 2 with StandardDialect

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

the class ElementProcessorsTest method testElementMarkupProcessors.

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

Example 3 with StandardDialect

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

the class PrePostProcessorsTest method testPrePostProcessors.

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

Example 4 with StandardDialect

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

the class ProcessorsTest method testReplaceWithProcessable.

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

Example 5 with StandardDialect

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

the class ProcessorsTest method testReplaceWithNonProcessable.

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

Aggregations

IDialect (org.thymeleaf.dialect.IDialect)24 StandardDialect (org.thymeleaf.standard.StandardDialect)24 Test (org.junit.Test)22 TestExecutor (org.thymeleaf.testing.templateengine.engine.TestExecutor)22 PrecedenceDialect (org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect)6 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 ITemplateEngine (org.thymeleaf.ITemplateEngine)1 TemplateEngine (org.thymeleaf.TemplateEngine)1 IExecutionAttributeDialect (org.thymeleaf.dialect.IExecutionAttributeDialect)1 IExpressionObjectDialect (org.thymeleaf.dialect.IExpressionObjectDialect)1 IPostProcessorDialect (org.thymeleaf.dialect.IPostProcessorDialect)1 IPreProcessorDialect (org.thymeleaf.dialect.IPreProcessorDialect)1