Class RestUtility

java.lang.Object
net.serenitybdd.rest.RestUtility

public class RestUtility
extends java.lang.Object
User: YamStranger Date: 4/5/16 Time: 8:27 PM This class directly calls some methods from SerenityRest related only to creating some predefined objects like arguments, configs, auth schemes and so on, can be used for better readability of code. There is no difference what to use this class or SerenityRest.
  • Constructor Summary

    Constructors
    Constructor Description
    RestUtility()  
  • Method Summary

    Modifier and Type Method Description
    static io.restassured.authentication.AuthenticationScheme basic​(java.lang.String userName, java.lang.String password)  
    static io.restassured.authentication.AuthenticationScheme certificate​(java.lang.String certURL, java.lang.String password)  
    static io.restassured.authentication.AuthenticationScheme certificate​(java.lang.String certURL, java.lang.String password, io.restassured.authentication.CertificateAuthSettings certificateAuthSettings)  
    static io.restassured.authentication.AuthenticationScheme digest​(java.lang.String userName, java.lang.String password)  
    static io.restassured.authentication.AuthenticationScheme form​(java.lang.String userName, java.lang.String password)  
    static io.restassured.authentication.AuthenticationScheme form​(java.lang.String userName, java.lang.String password, io.restassured.authentication.FormAuthConfig config)  
    static io.restassured.config.RestAssuredConfig newConfig()  
    static io.restassured.authentication.AuthenticationScheme oauth​(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String secretToken)  
    static io.restassured.authentication.AuthenticationScheme oauth​(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String secretToken, io.restassured.authentication.OAuthSignature signature)  
    static io.restassured.authentication.AuthenticationScheme oauth2​(java.lang.String accessToken)  
    static io.restassured.authentication.AuthenticationScheme oauth2​(java.lang.String accessToken, io.restassured.authentication.OAuthSignature signature)  
    static io.restassured.authentication.PreemptiveAuthProvider preemptive()  
    static java.util.List<io.restassured.specification.Argument> withArgs​(java.lang.Object firstArgument, java.lang.Object... additionalArguments)  
    static java.util.List<io.restassured.specification.Argument> withArguments​(java.lang.Object firstArgument, java.lang.Object... additionalArguments)  
    static java.util.List<io.restassured.specification.Argument> withNoArgs()  
    static java.util.List<io.restassured.specification.Argument> withNoArguments()  

    Methods inherited from class java.lang.Object

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

    • RestUtility

      public RestUtility()
  • Method Details

    • withArguments

      public static java.util.List<io.restassured.specification.Argument> withArguments​(java.lang.Object firstArgument, java.lang.Object... additionalArguments)
    • withNoArguments

      public static java.util.List<io.restassured.specification.Argument> withNoArguments()
    • withArgs

      public static java.util.List<io.restassured.specification.Argument> withArgs​(java.lang.Object firstArgument, java.lang.Object... additionalArguments)
    • withNoArgs

      public static java.util.List<io.restassured.specification.Argument> withNoArgs()
    • oauth2

      public static io.restassured.authentication.AuthenticationScheme oauth2​(java.lang.String accessToken)
    • certificate

      public static io.restassured.authentication.AuthenticationScheme certificate​(java.lang.String certURL, java.lang.String password)
    • certificate

      public static io.restassured.authentication.AuthenticationScheme certificate​(java.lang.String certURL, java.lang.String password, io.restassured.authentication.CertificateAuthSettings certificateAuthSettings)
    • form

      public static io.restassured.authentication.AuthenticationScheme form​(java.lang.String userName, java.lang.String password)
    • form

      public static io.restassured.authentication.AuthenticationScheme form​(java.lang.String userName, java.lang.String password, io.restassured.authentication.FormAuthConfig config)
    • preemptive

      public static io.restassured.authentication.PreemptiveAuthProvider preemptive()
    • oauth2

      public static io.restassured.authentication.AuthenticationScheme oauth2​(java.lang.String accessToken, io.restassured.authentication.OAuthSignature signature)
    • basic

      public static io.restassured.authentication.AuthenticationScheme basic​(java.lang.String userName, java.lang.String password)
    • newConfig

      public static io.restassured.config.RestAssuredConfig newConfig()
    • oauth

      public static io.restassured.authentication.AuthenticationScheme oauth​(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String secretToken, io.restassured.authentication.OAuthSignature signature)
    • oauth

      public static io.restassured.authentication.AuthenticationScheme oauth​(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String accessToken, java.lang.String secretToken)
    • digest

      public static io.restassured.authentication.AuthenticationScheme digest​(java.lang.String userName, java.lang.String password)