Java Code Examples for com.jayway.restassured.RestAssured#config()
The following examples show how to use
com.jayway.restassured.RestAssured#config() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RestAssuredTest.java From xyz-hub with Apache License 2.0 | 5 votes |
@BeforeClass public static void configureRestAssured() { RestAssured.baseURI = RestAssuredConfig.config().baseURI; RestAssured.port = RestAssuredConfig.config().port; RestAssured.enableLoggingOfRequestAndResponseIfValidationFails(); RestAssured.config = RestAssured.config().encoderConfig(encoderConfig().defaultContentCharset("UTF-8")); RestAssured.config = RestAssured.config().decoderConfig(decoderConfig().defaultContentCharset("UTF-8")); }
Example 2
Source File: BaseWebIntegrationTest.java From moserp with Apache License 2.0 | 5 votes |
@Before public void setUpRestAssured() { RestAssured.port = testEnvironment.getPort(); RestAssured.authentication = RestAssured.basic(testEnvironment.getUsername(), testEnvironment.getPassword()); RestAssured.config = RestAssured.config(); RestAssured.config.getEncoderConfig().defaultContentCharset("UTF-8"); }
Example 3
Source File: ServletTest.java From PeerWasp with MIT License | 5 votes |
private static void configureRestAssured() { RestAssured.config = RestAssuredConfig.config().objectMapperConfig( objectMapperConfig().gsonObjectMapperFactory(new GsonObjectMapperFactory() { public Gson create(@SuppressWarnings("rawtypes") Class cls, String charset) { return createGsonInstance(); } } )); }