Package net.serenitybdd.rest
Class RestDefaultsChained
java.lang.Object
net.serenitybdd.rest.RestDefaultsChained
public class RestDefaultsChained
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
setting default values and parameters, can be used for better readability of code using
method chaining, also known as named parameter idiom.
So now it is possible to configure serenity rest using line:
new RestDefaultsChained().setDefaultBasePath("some/path").setDefaultProxy(object).setDefaultPort(10)
There is no difference in behaving between this class or SerenityRest.
-
Constructor Summary
Constructors Constructor Description RestDefaultsChained()
-
Method Summary
Modifier and Type Method Description RestDefaultsChained
enableLoggingOfRequestAndResponseIfValidationFails()
RestDefaultsChained
enableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail)
RestDefaultsChained
filters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)
RestDefaultsChained
filters(java.util.List<io.restassured.filter.Filter> filters)
RestDefaultsChained
keystore(java.io.File pathToJks, java.lang.String password)
RestDefaultsChained
keystore(java.lang.String password)
RestDefaultsChained
keystore(java.lang.String pathToJks, java.lang.String password)
RestDefaultsChained
objectMapper(io.restassured.mapper.ObjectMapper objectMapper)
RestDefaultsChained
proxy(int port)
RestDefaultsChained
proxy(io.restassured.specification.ProxySpecification proxySpecification)
RestDefaultsChained
proxy(java.lang.String host)
RestDefaultsChained
proxy(java.lang.String host, int port)
RestDefaultsChained
proxy(java.lang.String host, int port, java.lang.String scheme)
RestDefaultsChained
proxy(java.net.URI uri)
RestDefaultsChained
registerParser(java.lang.String contentType, io.restassured.parsing.Parser parser)
RestDefaultsChained
replaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)
RestDefaultsChained
reset()
RestDefaultsChained
restDefaultsChainedreplaceFiltersWith(java.util.List<io.restassured.filter.Filter> filters)
RestDefaultsChained
setDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication)
RestDefaultsChained
setDefaultBasePath(java.lang.String basePath)
RestDefaultsChained
setDefaultConfig(io.restassured.config.RestAssuredConfig config)
RestDefaultsChained
setDefaultParser(io.restassured.parsing.Parser defaultParser)
RestDefaultsChained
setDefaultPort(int port)
RestDefaultsChained
setDefaultProxy(int port)
RestDefaultsChained
setDefaultProxy(io.restassured.specification.ProxySpecification proxy)
RestDefaultsChained
setDefaultProxy(java.lang.String host, int port)
RestDefaultsChained
setDefaultProxy(java.lang.String host, int port, java.lang.String scheme)
RestDefaultsChained
setDefaultProxy(java.net.URI uri)
RestDefaultsChained
setDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification)
RestDefaultsChained
setDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification)
RestDefaultsChained
setDefaultRootPath(java.lang.String rootPath)
RestDefaultsChained
setDefaultSessionId(java.lang.String sessionId)
RestDefaultsChained
setUrlEncodingEnabled(boolean urlEncodingEnabled)
RestDefaultsChained
trustStore(java.security.KeyStore truststore)
RestDefaultsChained
unregisterParser(java.lang.String contentType)
RestDefaultsChained
useRelaxedHTTPSValidation()
RestDefaultsChained
useRelaxedHTTPSValidation(java.lang.String protocol)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RestDefaultsChained
public RestDefaultsChained()
-
-
Method Details
-
setDefaultBasePath
-
setDefaultPort
-
setUrlEncodingEnabled
-
setDefaultRootPath
-
setDefaultSessionId
-
setDefaultAuthentication
public RestDefaultsChained setDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication) -
setDefaultRequestSpecification
public RestDefaultsChained setDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification) -
setDefaultParser
-
setDefaultResponseSpecification
public RestDefaultsChained setDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification) -
reset
-
filters
-
filters
public RestDefaultsChained filters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) -
restDefaultsChainedreplaceFiltersWith
public RestDefaultsChained restDefaultsChainedreplaceFiltersWith(java.util.List<io.restassured.filter.Filter> filters) -
replaceFiltersWith
public RestDefaultsChained replaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) -
objectMapper
-
useRelaxedHTTPSValidation
-
useRelaxedHTTPSValidation
-
registerParser
public RestDefaultsChained registerParser(java.lang.String contentType, io.restassured.parsing.Parser parser) -
unregisterParser
-
trustStore
-
enableLoggingOfRequestAndResponseIfValidationFails
-
enableLoggingOfRequestAndResponseIfValidationFails
public RestDefaultsChained enableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail) -
proxy
-
proxy
-
proxy
-
proxy
-
proxy
-
proxy
public RestDefaultsChained proxy(io.restassured.specification.ProxySpecification proxySpecification) -
setDefaultProxy
public RestDefaultsChained setDefaultProxy(java.lang.String host, int port, java.lang.String scheme) -
setDefaultProxy
-
setDefaultProxy
-
setDefaultProxy
-
setDefaultProxy
-
keystore
-
keystore
-
keystore
-
setDefaultConfig
-