Class SpringSecurityUIUnitTest
java.lang.Object
com.vaadin.testbench.uiunittest.AbstractUIUnitTest
com.vaadin.testbench.uiunittest.SpringUIUnitTest
com.vaadin.testbench.uiunittest.SpringSecurityUIUnitTest
Spring UI unit test base with Spring Security authentication helpers.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractUIUnitTest
AbstractUIUnitTest.DeploymentMode, AbstractUIUnitTest.QueryResult<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidauthenticate(String username, String... authorities) Authenticate with the given username and authorities.protected voidHook invoked before the Spring/Vaadin mock environment is created.protected voidConfigure the default security context for a test.voidtearDown()Do clean-up of the mocked Vaadin created with mockVaadin methods.Methods inherited from class SpringUIUnitTest
afterContextRefresh, configureContext, getApplicationContext, getConfigurationClasses, getDeploymentMode, getService, getServletContext, getSession, getUiClass, getVaadinRequest, getVaadinSession, mockVaadin, mockVaadin, navigate, runSpringBootStartupRunners
-
Constructor Details
-
SpringSecurityUIUnitTest
public SpringSecurityUIUnitTest()
-
-
Method Details
-
beforeMockVaadin
protected void beforeMockVaadin()Description copied from class:SpringUIUnitTestHook invoked before the Spring/Vaadin mock environment is created.- Overrides:
beforeMockVaadinin classSpringUIUnitTest
-
tearDown
public void tearDown()Description copied from class:AbstractUIUnitTestDo clean-up of the mocked Vaadin created with mockVaadin methods. This may be necessary especially if custom UI have side effects.- Overrides:
tearDownin classSpringUIUnitTest- See Also:
-
configureSecurityContext
protected void configureSecurityContext()Configure the default security context for a test. The default implementation does nothing. -
authenticate
-