Class HttpResponseExpectation
java.lang.Object
io.vertx.reactivex.core.http.HttpResponseExpectation
Common expectations for HTTP responses.
- Author:
- Julien Viet
-
Method Summary
Modifier and TypeMethodDescriptionstatic <H extends HttpResponseHead>
SingleTransformer<H, H> contentType(String mimeType) Creates an expectation validating the response has acontent-typeheader matching themimeType.static <H extends HttpResponseHead>
SingleTransformer<H, H> contentType(String... mimeTypes) Creates an expectation validating the response has acontent-typeheader matching one of themimeTypes.static <H extends HttpResponseHead>
SingleTransformer<H, H> contentType(List<String> mimeTypes) Creates an expectation validating the response has acontent-typeheader 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 Details
-
status
Creates an expectation asserting that the status response code is equal tostatusCode.- Parameters:
statusCode- the expected status code
-
status
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
Creates an expectation validating the response has acontent-typeheader matching themimeType.- Parameters:
mimeType- the mime type
-
contentType
Creates an expectation validating the response has acontent-typeheader 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-typeheader matching one of themimeTypes.- Parameters:
mimeTypes- the list of mime types
-