java.lang.Object
net.serenitybdd.screenplay.rest.questions.RestQuestion<T>
All Implemented Interfaces:
net.serenitybdd.screenplay.Question<T>

public class RestQuestion<T> extends Object implements net.serenitybdd.screenplay.Question<T>
A REST query that sends a GET request to an endpoint and returns a result of a given type. Sample usage: public static Question<Float> cashBalanceFor(Client client) { return new RestQuestionBuilder<Float>().about("Cash account balance") .to("/client/{clientId}/portfolio") .withParameters(request -> request.pathParam("clientId", client.getId())) .returning(response -> response.path("cash")); }
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • answeredBy

      public T answeredBy(net.serenitybdd.screenplay.Actor actor)
      Specified by:
      answeredBy in interface net.serenitybdd.screenplay.Question<T>