Class Ensure

java.lang.Object
net.serenitybdd.rest.Ensure

public class Ensure
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    Ensure()  
  • Method Summary

    Modifier and Type Method Description
    Ensure andThat​(java.lang.String description, java.util.function.Consumer<io.restassured.response.ValidatableResponse> check)  
    static Ensure that​(java.lang.String description, java.util.function.Consumer<io.restassured.response.ValidatableResponse> check)
    A helper method to make a RestAssured assertion appear as a separate step.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Ensure

      public Ensure()
  • Method Details

    • that

      public static Ensure that​(java.lang.String description, java.util.function.Consumer<io.restassured.response.ValidatableResponse> check)
      A helper method to make a RestAssured assertion appear as a separate step. e.g Ensure.that("Commany name should be returned", response -> response.body("companyName", equalTo("Apple Inc.s")));
      Parameters:
      description -
      check -
    • andThat

      public Ensure andThat​(java.lang.String description, java.util.function.Consumer<io.restassured.response.ValidatableResponse> check)