程序包 cn.taketoday.test.web.servlet.setup
@NonNullApi
@NonNullFields
package cn.taketoday.test.web.servlet.setup
Contains built-in
MockMvcBuilder implementations.
Use MockMvcBuilders
to access to instances of those implementations.-
类说明AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>>Abstract implementation of
MockMvcBuilderwith common methods for configuring filters, default request properties, global expectations and global result actions.ConfigurableMockMvcBuilder<B extends ConfigurableMockMvcBuilder<B>>Defines common methods for building aMockMvc.A concrete implementation ofAbstractMockMvcBuilderthat provides theWebApplicationContextsupplied to it as a constructor argument.The main class to import in order to access all availableMockMvcBuilders.Contract for customizing aConfigurableMockMvcBuilderin some specific way, e.g. a 3rd party library that wants to provide shortcuts for setting up a MockMvc.An empty method implementation ofMockMvcConfigurer.A Filter that invokes a delegateFilteronly if the request URL matches the pattern it is mapped to using pattern matching as defined in the Servlet spec.MockMvcConfigurerthat stores and re-uses the HTTP session across multiple requests performed through the sameMockMvcinstance.AMockMvcBuilderthat accepts@Controllerregistrations thus allowing full control over the instantiation and initialization of controllers and their dependencies similar to plain unit tests, and also making it possible to test one controller at a time.AViewResolverthat always returns same View.A stub WebApplicationContext that accepts registrations of object instances.