abstract class MockMvcWebConnectionBuilderSupport<T : MockMvcWebConnectionBuilderSupport<T>>
Support class that simplifies the creation of a WebConnection that uses MockMvc and optionally delegates to a real WebConnection for specific requests.
The default is to use MockMvc for requests to localhost
and otherwise use a real WebConnection.
Author
Rob Winch
Author
Sam Brannen
Since
4.2
open fun alwaysUseMockMvc(): T
Specify that MockMvc should always be used regardless of what the request looks like. |
|
open fun contextPath(contextPath: String): T
Set the context path to use. If the supplied value is Default is |
|
open fun useMockMvc(vararg matchers: WebRequestMatcher): T
Add additional WebRequestMatcher instances that will ensure that MockMvc is used to process the request, if such a matcher matches against the web request. |
|
open fun useMockMvcForHosts(vararg hosts: String): T
Add additional WebRequestMatcher instances that return |
open class MockMvcHtmlUnitDriverBuilder : MockMvcWebConnectionBuilderSupport<MockMvcHtmlUnitDriverBuilder>
By default, the driver will delegate to |
|
open class MockMvcWebClientBuilder : MockMvcWebConnectionBuilderSupport<MockMvcWebClientBuilder>
The |