Search in sources :

Example 1 with HttpServerRequest

use of io.vertx.reactivex.core.http.HttpServerRequest in project knotx by Cognifide.

the class SupportedMethodsAndPathsHandlerTest method mockContext.

private RoutingContext mockContext(String requestPath, HttpMethod method) {
    RoutingContext context = Mockito.mock(RoutingContext.class);
    HttpServerRequest httpRequest = Mockito.mock(HttpServerRequest.class);
    Mockito.when(context.request()).thenReturn(httpRequest);
    Mockito.when(httpRequest.path()).thenReturn(requestPath);
    Mockito.when(httpRequest.method()).thenReturn(method);
    return context;
}
Also used : RoutingContext(io.vertx.reactivex.ext.web.RoutingContext) HttpServerRequest(io.vertx.reactivex.core.http.HttpServerRequest)

Aggregations

HttpServerRequest (io.vertx.reactivex.core.http.HttpServerRequest)1 RoutingContext (io.vertx.reactivex.ext.web.RoutingContext)1