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 RestDefaultsChainedenableLoggingOfRequestAndResponseIfValidationFails()RestDefaultsChainedenableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail)RestDefaultsChainedfilters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)RestDefaultsChainedfilters(java.util.List<io.restassured.filter.Filter> filters)RestDefaultsChainedkeystore(java.io.File pathToJks, java.lang.String password)RestDefaultsChainedkeystore(java.lang.String password)RestDefaultsChainedkeystore(java.lang.String pathToJks, java.lang.String password)RestDefaultsChainedobjectMapper(io.restassured.mapper.ObjectMapper objectMapper)RestDefaultsChainedproxy(int port)RestDefaultsChainedproxy(io.restassured.specification.ProxySpecification proxySpecification)RestDefaultsChainedproxy(java.lang.String host)RestDefaultsChainedproxy(java.lang.String host, int port)RestDefaultsChainedproxy(java.lang.String host, int port, java.lang.String scheme)RestDefaultsChainedproxy(java.net.URI uri)RestDefaultsChainedregisterParser(java.lang.String contentType, io.restassured.parsing.Parser parser)RestDefaultsChainedreplaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)RestDefaultsChainedreset()RestDefaultsChainedrestDefaultsChainedreplaceFiltersWith(java.util.List<io.restassured.filter.Filter> filters)RestDefaultsChainedsetDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication)RestDefaultsChainedsetDefaultBasePath(java.lang.String basePath)RestDefaultsChainedsetDefaultConfig(io.restassured.config.RestAssuredConfig config)RestDefaultsChainedsetDefaultParser(io.restassured.parsing.Parser defaultParser)RestDefaultsChainedsetDefaultPort(int port)RestDefaultsChainedsetDefaultProxy(int port)RestDefaultsChainedsetDefaultProxy(io.restassured.specification.ProxySpecification proxy)RestDefaultsChainedsetDefaultProxy(java.lang.String host, int port)RestDefaultsChainedsetDefaultProxy(java.lang.String host, int port, java.lang.String scheme)RestDefaultsChainedsetDefaultProxy(java.net.URI uri)RestDefaultsChainedsetDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification)RestDefaultsChainedsetDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification)RestDefaultsChainedsetDefaultRootPath(java.lang.String rootPath)RestDefaultsChainedsetDefaultSessionId(java.lang.String sessionId)RestDefaultsChainedsetUrlEncodingEnabled(boolean urlEncodingEnabled)RestDefaultsChainedtrustStore(java.security.KeyStore truststore)RestDefaultsChainedunregisterParser(java.lang.String contentType)RestDefaultsChaineduseRelaxedHTTPSValidation()RestDefaultsChaineduseRelaxedHTTPSValidation(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
-