java.lang.Object
io.helidon.webserver.testsupport.RouteMock

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

    • RouteMock

      public RouteMock()
  • Method Details

    • 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, 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(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(Routing routing)
      Creates new client with this mock and provided routing.
      Parameters:
      routing - a routing for the client.
      Returns:
      new test client.