Uses of Class
org.springframework.test.web.servlet.MockMvc
Package
Description
Contains client-side REST testing support.
Contains server-side support for testing Spring MVC applications.
AssertJ support for MockMvc.
Support for testing Spring MVC applications via
WebTestClient
with MockMvc
for server request
handling.Server-side support for testing Spring MVC applications with
MockMvc
and HtmlUnit.Server-side support for testing Spring MVC applications with
MockMvc
and the Selenium HtmlUnitDriver
.Contains built-in
MockMvcBuilder
implementations.-
Uses of MockMvc in org.springframework.test.web.client
-
Uses of MockMvc in org.springframework.test.web.servlet
Modifier and TypeMethodDescriptionMockMvcBuilder.build()
Build aMockMvc
instance.protected final MockMvc
MockMvcBuilderSupport.createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, Charset defaultResponseCharacterEncoding, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, List<DispatcherServletCustomizer> dispatcherServletCustomizers) Delegates toMockMvcBuilderSupport.createMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)
for creation of theMockMvc
instance and configures that instance with the supplieddefaultResponseCharacterEncoding
.protected final MockMvc
MockMvcBuilderSupport.createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, List<DispatcherServletCustomizer> dispatcherServletCustomizers) -
Uses of MockMvc in org.springframework.test.web.servlet.assertj
Modifier and TypeMethodDescriptionstatic MockMvcTester
Create an instance that delegates to the givenMockMvc
instance.Modifier and TypeMethodDescriptionstatic MockMvcTester
MockMvcTester.from
(WebApplicationContext applicationContext, Function<DefaultMockMvcBuilder, MockMvc> customizations) Create an instance using the given, fully initialized (i.e., refreshed)WebApplicationContext
.static MockMvcTester
MockMvcTester.of
(Collection<?> controllers, Function<StandaloneMockMvcBuilder, MockMvc> customizations) Create an instance by registering one or more@Controller
instances and configuring Spring MVC infrastructure programmatically. -
Uses of MockMvc in org.springframework.test.web.servlet.client
Modifier and TypeMethodDescriptionstatic WebTestClient.Builder
Begin creating aWebTestClient
by providing an already initializedMockMvc
instance to use as the server. -
Uses of MockMvc in org.springframework.test.web.servlet.htmlunit
Modifier and TypeMethodDescriptionstatic MockMvcWebClientBuilder
MockMvcWebClientBuilder.mockMvcSetup
(MockMvc mockMvc) Create a newMockMvcWebClientBuilder
based on the suppliedMockMvc
instance.ModifierConstructorDescriptionprotected
MockMvcWebClientBuilder
(MockMvc mockMvc) MockMvcWebConnection
(MockMvc mockMvc, org.htmlunit.WebClient webClient) Create a new instance that assumes the context path of the application is""
(i.e., the root context).MockMvcWebConnection
(MockMvc mockMvc, org.htmlunit.WebClient webClient, String contextPath) Create a new instance with the specified context path.protected
Create a new instance using the suppliedMockMvc
instance. -
Uses of MockMvc in org.springframework.test.web.servlet.htmlunit.webdriver
Modifier and TypeMethodDescriptionstatic MockMvcHtmlUnitDriverBuilder
MockMvcHtmlUnitDriverBuilder.mockMvcSetup
(MockMvc mockMvc) Create a newMockMvcHtmlUnitDriverBuilder
based on the suppliedMockMvc
instance. -
Uses of MockMvc in org.springframework.test.web.servlet.setup