Package io.vertx.reactivex.core.http
Class HttpResponseExpectation
- java.lang.Object
-
- io.vertx.reactivex.core.http.HttpResponseExpectation
-
public class HttpResponseExpectation extends Object
Common expectations for HTTP responses.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <H extends HttpResponseHead>
SingleTransformer<H,H>contentType(String mimeType)
Creates an expectation validating the response has acontent-type
header matching themimeType
.static <H extends HttpResponseHead>
SingleTransformer<H,H>contentType(String... mimeTypes)
Creates an expectation validating the response has acontent-type
header matching one of themimeTypes
.static <H extends HttpResponseHead>
SingleTransformer<H,H>contentType(List<String> mimeTypes)
Creates an expectation validating the response has acontent-type
header matching one of themimeTypes
.static <H extends HttpResponseHead>
SingleTransformer<H,H>status(int statusCode)
Creates an expectation asserting that the status response code is equal tostatusCode
.static <H extends HttpResponseHead>
SingleTransformer<H,H>status(int min, int max)
Creates an expectation asserting that the status response code is between tomin
(inclusive) andmax
(exclusive).
-
-
-
Method Detail
-
status
public static <H extends HttpResponseHead> SingleTransformer<H,H> status(int statusCode)
Creates an expectation asserting that the status response code is equal tostatusCode
.- Parameters:
statusCode
- the expected status code
-
status
public static <H extends HttpResponseHead> SingleTransformer<H,H> status(int min, int max)
Creates an expectation asserting that the status response code is between tomin
(inclusive) andmax
(exclusive).- Parameters:
min
- the min status codemax
- the max status code
-
contentType
public static <H extends HttpResponseHead> SingleTransformer<H,H> contentType(String mimeType)
Creates an expectation validating the response has acontent-type
header matching themimeType
.- Parameters:
mimeType
- the mime type
-
contentType
public static <H extends HttpResponseHead> SingleTransformer<H,H> contentType(String... mimeTypes)
Creates an expectation validating the response has acontent-type
header matching one of themimeTypes
.- Parameters:
mimeTypes
- the list of mime types
-
contentType
public static <H extends HttpResponseHead> SingleTransformer<H,H> contentType(List<String> mimeTypes)
Creates an expectation validating the response has acontent-type
header matching one of themimeTypes
.- Parameters:
mimeTypes
- the list of mime types
-
-