Search in sources :

Example 1 with SpringWebProcessingContextBuilder

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

the class Conversion2Test method testConversion.

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

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

the class Conversion6Test method testConversion.

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

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

the class SpringBaseTest method testSpringBaseConditionalComments.

@Test
public void testSpringBaseConditionalComments() 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/springbase/springbaseconditionalcomments.thindex");
    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 4 with SpringWebProcessingContextBuilder

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

the class SpringBaseTest method testSpringBase.

@Test
public void testSpringBase() 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/springbase/springbase.thindex");
    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 5 with SpringWebProcessingContextBuilder

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

the class SpringIntegrationTest method testRequestDataFormWithoutCompiledSpEL.

@Test
public void testRequestDataFormWithoutCompiledSpEL() 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/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