Search in sources :

Example 36 with TestExecutor

use of org.thymeleaf.testing.templateengine.engine.TestExecutor in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testRequestDataFormWithCompiledSpEL.

@Test
public void testRequestDataFormWithCompiledSpEL() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springintegration/requestdata/applicationContext-with.xml");
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(contextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(true) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/springintegration/requestdata/formwith");
    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) Test(org.junit.Test)

Example 37 with TestExecutor

use of org.thymeleaf.testing.templateengine.engine.TestExecutor in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testExpressionCompiledSpEL.

@Test
public void testExpressionCompiledSpEL() throws Exception {
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(new SpringIntegrationWebProcessingContextBuilder());
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(true) }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/springintegration/expression");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) ErrorsSpringIntegrationWebProcessingContextBuilder(org.thymeleaf.templateengine.springintegration.context.ErrorsSpringIntegrationWebProcessingContextBuilder) SpringIntegrationWebProcessingContextBuilder(org.thymeleaf.templateengine.springintegration.context.SpringIntegrationWebProcessingContextBuilder) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 38 with TestExecutor

use of org.thymeleaf.testing.templateengine.engine.TestExecutor in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testXmlNs.

@Test
public void testXmlNs() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation(null);
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(contextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance() }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/springintegration/xmlns");
    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) Test(org.junit.Test)

Example 39 with TestExecutor

use of org.thymeleaf.testing.templateengine.engine.TestExecutor in project thymeleaf-tests by thymeleaf.

the class SpringSecurityTest method testSpringSecurity.

@Test
public void testSpringSecurity() throws Exception {
    final SpringSecurityWebProcessingContextBuilder processingContextBuilder = new SpringSecurityWebProcessingContextBuilder();
    processingContextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springsecurity/applicationContext-security.xml");
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(processingContextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new SpringSecurityDialect() }));
    executor.execute("classpath:templateengine/springsecurity");
    Assert.assertTrue(executor.isAllOK());
}
Also used : TestExecutor(org.thymeleaf.testing.templateengine.engine.TestExecutor) SpringSecurityDialect(org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect) SpringSecurityWebProcessingContextBuilder(org.thymeleaf.testing.templateengine.context.web.SpringSecurityWebProcessingContextBuilder) IDialect(org.thymeleaf.dialect.IDialect) Test(org.junit.Test)

Example 40 with TestExecutor

use of org.thymeleaf.testing.templateengine.engine.TestExecutor in project thymeleaf-tests by thymeleaf.

the class TemplateBoundariesTest method testGTVGXHTML.

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

Aggregations

TestExecutor (org.thymeleaf.testing.templateengine.engine.TestExecutor)127 Test (org.junit.Test)126 IDialect (org.thymeleaf.dialect.IDialect)61 StandardDialect (org.thymeleaf.standard.StandardDialect)22 SpringWebProcessingContextBuilder (org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder)21 ErrorsSpringIntegrationWebProcessingContextBuilder (org.thymeleaf.templateengine.springintegration.context.ErrorsSpringIntegrationWebProcessingContextBuilder)8 PrecedenceDialect (org.thymeleaf.templateengine.elementprocessors.dialect.PrecedenceDialect)6 SpringIntegrationWebProcessingContextBuilder (org.thymeleaf.templateengine.springintegration.context.SpringIntegrationWebProcessingContextBuilder)6 TemplateBoundariesDialect (org.thymeleaf.templateengine.templateboundaries.dialect.TemplateBoundariesDialect)4 SpringSecurityDialect (org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect)2 Dialect01 (org.thymeleaf.templateengine.aggregation.dialect.Dialect01)2 InteractionDialect01 (org.thymeleaf.templateengine.features.interaction.InteractionDialect01)2 SpringSecurityWebProcessingContextBuilder (org.thymeleaf.testing.templateengine.context.web.SpringSecurityWebProcessingContextBuilder)2 WebProcessingContextBuilder (org.thymeleaf.testing.templateengine.context.web.WebProcessingContextBuilder)2 Dialect02 (org.thymeleaf.templateengine.aggregation.dialect.Dialect02)1 ContextDialect (org.thymeleaf.templateengine.context.dialect.ContextDialect)1 ContextVarTestDialect (org.thymeleaf.templateengine.context.dialect.ContextVarTestDialect)1 Conversion3WebProcessingContextBuilder (org.thymeleaf.templateengine.conversion.conversion3.Conversion3WebProcessingContextBuilder)1 STSMWebProcessingContextBuilder (org.thymeleaf.templateengine.dataprefix.stsm.context.STSMWebProcessingContextBuilder)1 MarkupDialect (org.thymeleaf.templateengine.elementprocessors.dialect.MarkupDialect)1