Package com.vaadin.testbench.unit.mocks
Class MockSpringServletService
-
- All Implemented Interfaces:
-
java.io.Serializable
public class MockSpringServletService extends SpringVaadinServletServiceA mocking service that performs three very important tasks:
- Overrides isAtmosphereAvailable to tell Vaadin that we don't have Atmosphere (otherwise Vaadin will crash)
- Provides some dummy value as a root ID via getMainDivId (otherwise the mocked servlet env will crash).
- Provides a MockSpringVaadinSession instead of com.vaadin.flow.spring.SpringVaadinSession.
mavi
-
-
Field Summary
Fields Modifier and Type Field Description public final VaadinServletservletpublic final static StringINVALID_ATMOSPHERE_VERSION_WARNINGpublic final static StringATMOSPHERE_MISSING_ERRORpublic final DeploymentConfigurationdeploymentConfigurationpublic SystemMessagesProvidersystemMessagesProviderpublic ClassLoaderclassLoaderpublic Iterable<RequestHandler>requestHandlerspublic Iterable<DependencyFilter>dependencyFilterspublic BootstrapInitialPredicatebootstrapInitialPredicatepublic BootstrapUrlPredicatebootstrapUrlPredicatepublic Routerrouterpublic Instantiatorinstantiatorpublic Executorexecutorpublic Iterable<VaadinRequestInterceptor>vaadinRequestInterceptors
-
Constructor Summary
Constructors Constructor Description MockSpringServletService(MockSpringServlet servlet, DeploymentConfiguration deploymentConfiguration, ApplicationContext ctx, Function0<UI> uiFactory)MockSpringServletService(MockSpringServlet servlet, DeploymentConfiguration deploymentConfiguration, ApplicationContext ctx, UIFactory uiFactory)
-
Method Summary
Modifier and Type Method Description StringgetMainDivId(VaadinSession session, VaadinRequest request)InstantiatorgetInstantiator()-
Methods inherited from class com.vaadin.flow.server.VaadinServletService
getContextRootRelativePath, getCurrentResponse, getCurrentServletRequest, getMimeType, getResource, getResourceAsStream, getResourceInServletContext, getServiceName, getServlet, resolveResource -
Methods inherited from class com.vaadin.flow.server.VaadinService
accessSession, addServiceDestroyListener, addSessionDestroyListener, addSessionInitListener, addUIInitListener, closeSession, createCriticalNotificationJSON, createSessionExpiredJSON, createUINotFoundJSON, destroy, ensureAccessQueuePurged, ensurePushAvailable, findUI, findVaadinSession, fireSessionDestroy, fireUIInitListeners, getBootstrapInitialPredicate, getBootstrapUrlPredicate, getClassLoader, getContext, getCsrfTokenAttributeName, getCurrent, getCurrentRequest, getCurrentResponse, getDependencyFilters, getDeploymentConfiguration, getInstantiator, getRequestHandlers, getRouter, getSystemMessages, getSystemMessagesProvider, getVaadinRequestInterceptors, handleRequest, isCsrfTokenValid, isOtherSessionLocked, isResourceAvailable, isUIActive, modifyIndexHtmlResponse, reinitializeSession, removeSession, requestEnd, requestStart, runPendingAccessTasks, setBootstrapInitialPredicate, setBootstrapUrlPredicate, setClassLoader, setCurrent, setCurrentInstances, setSystemMessagesProvider, verifyNoOtherSessionLocked, writeStringResponse, writeUncachedStringResponse -
Methods inherited from class com.vaadin.flow.spring.SpringVaadinServletService
getExecutor, getStaticResource, init -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MockSpringServletService
MockSpringServletService(MockSpringServlet servlet, DeploymentConfiguration deploymentConfiguration, ApplicationContext ctx, Function0<UI> uiFactory)
-
MockSpringServletService
MockSpringServletService(MockSpringServlet servlet, DeploymentConfiguration deploymentConfiguration, ApplicationContext ctx, UIFactory uiFactory)
-
-
Method Detail
-
getMainDivId
String getMainDivId(VaadinSession session, VaadinRequest request)
-
getInstantiator
Instantiator getInstantiator()
-
-
-
-