Package com.vaadin.testbench.unit.mocks
Class MockVaadinServlet
-
- All Implemented Interfaces:
-
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,java.io.Serializable
public class MockVaadinServlet extends VaadinServletMakes sure that routes are properly registered, and that MockService is used instead of vanilla VaadinServletService.
To use a custom servlet instead of this one, just pass it to MockVaadin.setup.
-
-
Constructor Summary
Constructors Constructor Description MockVaadinServlet(Routes routes, Function0<UI> uiFactory)MockVaadinServlet(Routes routes)MockVaadinServlet()
-
Method Summary
Modifier and Type Method Description final RoutesgetRoutes()final Function0<UI>getUiFactory()-
Methods inherited from class com.vaadin.flow.server.VaadinServlet
destroy, getService, getServletConfig, init -
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletContext, getServletInfo, getServletName, init, log, log -
Methods inherited from class jakarta.servlet.http.HttpServlet
service -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getUiFactory
final Function0<UI> getUiFactory()
-
-
-
-