Class RestUtility


  • public class RestUtility
    extends 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

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

      • RestUtility

        public RestUtility()
    • Method Detail

      • withArguments

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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