Search in sources :

Example 11 with RestAssuredMockMvcConfig

use of io.restassured.module.mockmvc.config.RestAssuredMockMvcConfig in project rest-assured by rest-assured.

the class ResponseLoggingTest method given_config_is_stored_in_writer.

@Before
public void given_config_is_stored_in_writer() {
    writer = new StringWriter();
    PrintStream captor = new PrintStream(new WriterOutputStream(writer), true);
    RestAssuredMockMvc.config = new RestAssuredMockMvcConfig().logConfig(new LogConfig(captor, true));
}
Also used : PrintStream(java.io.PrintStream) RestAssuredMockMvcConfig(io.restassured.module.mockmvc.config.RestAssuredMockMvcConfig) StringWriter(java.io.StringWriter) WriterOutputStream(org.apache.commons.io.output.WriterOutputStream) LogConfig(io.restassured.config.LogConfig) Before(org.junit.Before)

Aggregations

RestAssuredMockMvcConfig (io.restassured.module.mockmvc.config.RestAssuredMockMvcConfig)11 LogConfig (io.restassured.config.LogConfig)7 Test (org.junit.Test)7 PostController (io.restassured.module.mockmvc.http.PostController)4 MockMvcRequestSpecBuilder (io.restassured.module.mockmvc.specification.MockMvcRequestSpecBuilder)3 MockMvcRequestSpecification (io.restassured.module.mockmvc.specification.MockMvcRequestSpecification)3 PrintStream (java.io.PrintStream)2 StringWriter (java.io.StringWriter)2 WriterOutputStream (org.apache.commons.io.output.WriterOutputStream)2 Before (org.junit.Before)2 ResponseSpecBuilder (io.restassured.builder.ResponseSpecBuilder)1 RestAssuredConfig (io.restassured.config.RestAssuredConfig)1 MockMvcRequestSpecificationImpl (io.restassured.module.mockmvc.internal.MockMvcRequestSpecificationImpl)1