java.lang.Object
io.helidon.webserver.testsupport.RouteMock
Provides ability to define mocking of particular routes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecutes this handler before first matched handler.Creates new client with this mock and provided routing.Replace single matched rout.skip(int matchRoutIndex) Skips single matched rout.
-
Constructor Details
-
RouteMock
public RouteMock()
-
-
Method Details
-
skip
Skips single matched rout.- Parameters:
matchRoutIndex- Index of the matched rout. First matched rout has index0.- Returns:
- updated instance.
-
replace
Replace single matched rout.- Parameters:
matchRoutIndex- Index of the matched rout. First matched rout has index0.handler- a new handler.- Returns:
- updated instance.
-
before
Executes this handler before first matched handler. Executed only if some handler is matched.- Parameters:
handler- a handler to execute.- Returns:
- updated instance.
-
client
Creates new client with this mock and provided routing.- Parameters:
routing- a routing for the client.- Returns:
- new test client.
-