Example usage for org.springframework.restdocs.restassured3 RestAssuredRestDocumentation documentationConfiguration

List of usage examples for org.springframework.restdocs.restassured3 RestAssuredRestDocumentation documentationConfiguration

Introduction

In this page you can find the example usage for org.springframework.restdocs.restassured3 RestAssuredRestDocumentation documentationConfiguration.

Prototype

public static RestAssuredRestDocumentationConfigurer documentationConfiguration(
        RestDocumentationContextProvider contextProvider) 

Source Link

Document

Provides access to a RestAssuredRestDocumentationConfigurer that can be used to configure Spring REST Docs using the given contextProvider .

Usage

From source file:com.netflix.genie.web.controllers.RestControllerIntegrationTestBase.java

/**
 * Clean out the db before every test.//ww w . jav  a2 s .c om
 *
 * @throws Exception on error
 */
public void setup() throws Exception {
    this.jobRepository.deleteAll();
    this.clusterRepository.deleteAll();
    this.commandRepository.deleteAll();
    this.applicationRepository.deleteAll();
    this.fileRepository.deleteAll();
    this.tagRepository.deleteAll();

    this.requestSpecification = new RequestSpecBuilder()
            .addFilter(RestAssuredRestDocumentation.documentationConfiguration(this.restDocumentation)
                    .snippets().withAdditionalDefaults(new WireMockSnippet()).and().operationPreprocessors()
                    .withRequestDefaults(Preprocessors.prettyPrint(),
                            Preprocessors.modifyUris().scheme(URI_SCHEME).host(URI_HOST).removePort())
                    .withResponseDefaults(Preprocessors.prettyPrint(),
                            Preprocessors.modifyUris().host(URI_HOST).scheme(URI_SCHEME).removePort()))
            .build();
}