Class RouteMock


  • public class RouteMock
    extends Object
    Provides ability to define mocking of particular routes.
    • Constructor Detail

      • RouteMock

        public RouteMock()
    • Method Detail

      • skip

        public RouteMock skip​(int matchRoutIndex)
        Skips single matched rout.
        Parameters:
        matchRoutIndex - Index of the matched rout. First matched rout has index 0.
        Returns:
        updated instance.
      • replace

        public RouteMock replace​(int matchRoutIndex,
                                 io.helidon.webserver.Handler handler)
        Replace single matched rout.
        Parameters:
        matchRoutIndex - Index of the matched rout. First matched rout has index 0.
        handler - a new handler.
        Returns:
        updated instance.
      • before

        public RouteMock before​(io.helidon.webserver.Handler handler)
        Executes this handler before first matched handler. Executed only if some handler is matched.
        Parameters:
        handler - a handler to execute.
        Returns:
        updated instance.
      • client

        public TestClient client​(io.helidon.webserver.Routing routing)
        Creates new client with this mock and provided routing.
        Parameters:
        routing - a routing for the client.
        Returns:
        new test client.