Package com.vaadin.browserless.mocks
package com.vaadin.browserless.mocks
-
ClassesClassDescriptionA standalone
ServletContext, backed by the build output of the module under test.TheUIthe mocked environment creates by default.The connection details everyMockRequestreports.A standaloneHttpSession, backed by an in-memory attribute map.Deprecated, for removal: This API element is subject to removal in a future version.Wrapping the instantiator of the mocked environment has no effect; use that instantiator directly.A standaloneHttpServletRequest, backed by the mocked session.A standaloneHttpServletResponsethat records what was written to it instead of sending anything.TheVaadinServletServiceof the mocked environment.TheServletConfigthe mocked servlet is initialized with.Makes sure that theMockSpringServlet.routesare properly registered, and thatMockSpringServletServiceis 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 aMockSpringVaadinSessioninstead ofcom.vaadin.flow.spring.SpringVaadinSession. 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.Helpers shared by the mocks in this package.Builds theServletContextthe mocked environment runs in.The lookup initializer of the mocked environment.TheVaadinServletof the mocked environment.AVaadinSessionthat is replaced by a fresh one when it is closed.An adapter to make a generic Spring ApplicationContext act like a WebApplicationContext.A live map of all attributes in this session.Configures mock request with authentication details from Spring Security.