Search in sources :

Example 6 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testXmlNsCompiledSpEL.

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

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder 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 8 with SpringWebProcessingContextBuilder

use of org.thymeleaf.testing.templateengine.context.web.SpringWebProcessingContextBuilder 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 9 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataUrlsWithoutCompiledSpEL.

@Test
public void testRequestDataUrlsWithoutCompiledSpEL() 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(true) }));
    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 10 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataFormWithout.

@Test
public void testRequestDataFormWithout() 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/formwithout");
    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