Search in sources :

Example 11 with SpringWebProcessingContextBuilder

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testRequestDataUrlsWithout.

@Test
public void testRequestDataUrlsWithout() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springintegration/requestdata/applicationContext-without.xml");
    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/requestdata/urlswithout");
    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 12 with SpringWebProcessingContextBuilder

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testMvcCompiledSpEL.

@Test
public void testMvcCompiledSpEL() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springintegration/mvc/applicationContext.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/mvc");
    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 13 with SpringWebProcessingContextBuilder

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.

the class SpringIntegrationTest method testRequestUrlsExpOobjectCompiledSpEL.

@Test
public void testRequestUrlsExpOobjectCompiledSpEL() 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/urlsexpobject");
    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 14 with SpringWebProcessingContextBuilder

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.

the class STSMTest method testSTSMWithIntegratedConversion.

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

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.

the class EscapingTest method testEscaping.

@Test
public void testEscaping() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation("classpath:templateengine/escaping/applicationContext.xml");
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(contextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance() }));
    executor.execute("classpath:templateengine/escaping");
    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)

Aggregations

Test (org.junit.Test)21 IDialect (org.thymeleaf.dialect.IDialect)21 SpringWebProcessingContextBuilder (org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder)21 TestExecutor (org.thymeleaf.testing.templateengine.engine.TestExecutor)21