Package com.vaadin.testbench.unit.mocks
package com.vaadin.testbench.unit.mocks
-
ClassDescriptionMakes sure that the
MockSpringServlet.routes
are properly registered, and thatMockSpringServletService
is used instead of vanillaSpringVaadinServletService
.A mocking service that performs three very important tasks: OverridesMockSpringServletService.isAtmosphereAvailable()
to tell Vaadin that we don't have Atmosphere (otherwise Vaadin will crash) Provides some dummy value as a root ID viaMockSpringServletService.getMainDivId(com.vaadin.flow.server.VaadinSession, com.vaadin.flow.server.VaadinRequest)
(otherwise the mocked servlet env will crash). Provides aMockSpringVaadinSession
instead ofSpringVaadinSession
. The class is intentionally opened, to be extensible in user's library.A Vaadin Session with one important difference: Creates a new session when this one is closed.An adapter to make a generic Spring ApplicationContext act like a WebApplicationContext.Configures mock request with authentication details from Spring Security.