swangkkb / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Add a RestAssuredMockMvc.standaloneSetup(DefaultMockMvcBuilder) method in order to allow more flexible customization of the spring context #321

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In my test I would like to be able to do something like this

DefaultMockMvcBuilder builder = MockMvcBuilders.standaloneSetup(controller1, 
...)
builder.setValidator(new LocalValidatorFactoryBean())

RestAssuredMockMvc.standaloneSetup(builder);

This gives quiet a few more options to customize the application context.

It should be sufficient to add a builder method to 
com.jayway.restassured.module.mockmvc.RestAssuredMockMvc

public static void standaloneSetup(DefaultMockMvcBuilder mockMvcBuilder) {
   mockMvc = mockMvcBuilder.build();
}

Original issue reported on code.google.com by Martin.A...@gmail.com on 26 Mar 2014 at 5:48

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 27 Mar 2014 at 6:12