Search in sources :

Example 1 with SmartRequestBuilder

use of org.springframework.test.web.servlet.SmartRequestBuilder in project spring-framework by spring-projects.

the class HtmlUnitRequestBuilder method merge.

@Override
public Object merge(Object parent) {
    if (parent instanceof RequestBuilder) {
        if (parent instanceof MockHttpServletRequestBuilder) {
            MockHttpServletRequestBuilder copiedParent = MockMvcRequestBuilders.get("/");
            copiedParent.merge(parent);
            this.parentBuilder = copiedParent;
        } else {
            this.parentBuilder = (RequestBuilder) parent;
        }
        if (parent instanceof SmartRequestBuilder) {
            this.parentPostProcessor = (SmartRequestBuilder) parent;
        }
    }
    return this;
}
Also used : MockHttpServletRequestBuilder(org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder) RequestBuilder(org.springframework.test.web.servlet.RequestBuilder) SmartRequestBuilder(org.springframework.test.web.servlet.SmartRequestBuilder) SmartRequestBuilder(org.springframework.test.web.servlet.SmartRequestBuilder) MockHttpServletRequestBuilder(org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder)

Aggregations

RequestBuilder (org.springframework.test.web.servlet.RequestBuilder)1 SmartRequestBuilder (org.springframework.test.web.servlet.SmartRequestBuilder)1 MockHttpServletRequestBuilder (org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder)1