Class MockVaadinServlet

  • All Implemented Interfaces:
    jakarta.servlet.Servlet , jakarta.servlet.ServletConfig , java.io.Serializable

    
    public class MockVaadinServlet
    extends VaadinServlet
                        

    Makes 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Routes routes
      private final Function0<UI> uiFactory
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Routes getRoutes()
      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
    • Constructor Detail

      • MockVaadinServlet

        MockVaadinServlet(Routes routes, Function0<UI> uiFactory)
      • MockVaadinServlet

        MockVaadinServlet(Routes routes)
      • MockVaadinServlet

        MockVaadinServlet()