use of org.thymeleaf.testing.templateengine.context.web.SpringSecurityWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.
the class SpringSecurityTest method testSpringSecurity.
@Test
public void testSpringSecurity() throws Exception {
final SpringSecurityWebProcessingContextBuilder processingContextBuilder = new SpringSecurityWebProcessingContextBuilder();
processingContextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springsecurity/applicationContext-security.xml");
final TestExecutor executor = TestExecutorFactory.createTestExecutor();
executor.setProcessingContextBuilder(processingContextBuilder);
executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new SpringSecurityDialect() }));
executor.execute("classpath:templateengine/springsecurity");
Assert.assertTrue(executor.isAllOK());
}
use of org.thymeleaf.testing.templateengine.context.web.SpringSecurityWebProcessingContextBuilder in project thymeleaf-tests by thymeleaf.
the class DataPrefixSpringSecurityTest method testSpringSecurity.
@Test
public void testSpringSecurity() throws Exception {
final SpringSecurityWebProcessingContextBuilder processingContextBuilder = new SpringSecurityWebProcessingContextBuilder();
processingContextBuilder.setApplicationContextConfigLocation("classpath:templateengine/dataprefix/springsecurity/applicationContext-security.xml");
final TestExecutor executor = TestExecutorFactory.createTestExecutor();
executor.setProcessingContextBuilder(processingContextBuilder);
executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new SpringSecurityDialect() }));
executor.execute("classpath:templateengine/dataprefix/springsecurity");
Assert.assertTrue(executor.isAllOK());
}
Aggregations