List of usage examples for org.springframework.restdocs.mockmvc MockMvcRestDocumentation documentationConfiguration
public static MockMvcRestDocumentationConfigurer documentationConfiguration( RestDocumentationContextProvider contextProvider)
From source file:org.openwms.tms.DocumentationBase.java
/** * Do something before each test method. * * @throws Exception Any error/* w w w .ja va 2 s . c om*/ */ @Before public void setUp() throws Exception { INIT_LOC = new Location(INIT_LOC_STRING); ERR_LOC = new Location(ERR_LOC_STRING); INIT_LOCGRB = new LocationGroup(INIT_LOCGB_STRING); ERR_LOCGRB = new LocationGroup(ERR_LOCGB_STRING); mockMvc = MockMvcBuilders.webAppContextSetup(context) .apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation).uris().withPort(8888)) .addFilters(new CharacterEncodingFilter("UTF-8", true)).build(); }
From source file:org.eclipse.hawkbit.rest.documentation.AbstractApiRestDocumentation.java
@Before protected void setUp() { this.document = document(resourceName + "/{method-name}", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint())); this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext) .apply(MockMvcRestDocumentation.documentationConfiguration(this.restDocumentation).uris() .withScheme("https").withHost(host + ".com").withPort(443)) .alwaysDo(this.document).addFilter(filterHttpResponse).build(); arrayPrefix = "[]"; }