Search in sources :

Example 21 with SpringWebProcessingContextBuilder

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

the class SpringBenchmarkTest method testSpringBenchmark.

@Test
public void testSpringBenchmark() throws Exception {
    final SpringWebProcessingContextBuilder contextBuilder = new SpringWebProcessingContextBuilder();
    contextBuilder.setApplicationContextConfigLocation(null);
    contextBuilder.setShareAppContextForAllTests(true);
    final TestExecutor executor = TestExecutorFactory.createTestExecutor();
    executor.setProcessingContextBuilder(contextBuilder);
    executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance() }));
    executor.setReporter(new BenchmarkTestReporter());
    executor.execute("classpath:benchmark/benchmark.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)

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