Search in sources :

Example 16 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataUrlsWith.

@Test
public void testRequestDataUrlsWith() 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() }));
    executor.setThrottleStep(this.throttleStep);
    executor.execute("classpath:templateengine/springintegration/requestdata/urlswith");
    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 17 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testMvc.

@Test
public void testMvc() 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() }));
    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 18 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataUrlsWithCompiledSpEL.

@Test
public void testRequestDataUrlsWithCompiledSpEL() 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/urlswith");
    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 19 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestUrlsExpOobject.

@Test
public void testRequestUrlsExpOobject() 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() }));
    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 20 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataFormWith.

@Test
public void testRequestDataFormWith() 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() }));
    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)

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