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 Details

    • status

      public static <H extends HttpResponseHead> SingleTransformer<H,H> status(int statusCode)
      Creates an expectation asserting that the status response code is equal to statusCode.
      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 to min (inclusive) and max (exclusive).
      Parameters:
      min - the min status code
      max - the max status code
    • contentType

      public static <H extends HttpResponseHead> SingleTransformer<H,H> contentType(String mimeType)
      Creates an expectation validating the response has a content-type header matching the mimeType.
      Parameters:
      mimeType - the mime type
    • contentType

      public static <H extends HttpResponseHead> SingleTransformer<H,H> contentType(String... mimeTypes)
      Creates an expectation validating the response has a content-type header matching one of the mimeTypes.
      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 a content-type header matching one of the mimeTypes.
      Parameters:
      mimeTypes - the list of mime types