类 AbstractMockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
java.lang.Object
cn.taketoday.test.web.servlet.client.AbstractMockMvcServerSpec<B>
- 类型参数:
B- the type of the concrete subclass spec
- 所有已实现的接口:
MockMvcWebTestClient.MockMvcServerSpec<B>
abstract class AbstractMockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
extends Object
implements MockMvcWebTestClient.MockMvcServerSpec<B>
Base class for implementations of
MockMvcWebTestClient.MockMvcServerSpec
that simply delegates to a ConfigurableMockMvcBuilder supplied by
the concrete subclasses.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T extends B>
TalwaysExpect(ResultMatcher resultMatcher) Define a global expectation that should always be applied to every response.<T extends B>
Tapply(MockMvcConfigurer configurer) Add aMockMvcConfigurerthat automates MockMvc setup.build()Shortcut to build the test client.Proceed to configure and build the test client.<T extends B>
TdefaultRequest(RequestBuilder requestBuilder) Define default request properties that should be merged into all performed requests such that input from the client request override the default properties defined here.<T extends B>
TAllow customization ofDispatcherServlet.final <T extends B>
TAdd a filter for specific URL patterns.<T extends B>
Tfilters(jakarta.servlet.Filter... filters) Add a global filter.protected abstract ConfigurableMockMvcBuilder<?>Return the concreteConfigurableMockMvcBuilderto delegate configuration methods and to use to create theMockMvc.private <T extends B>
Tself()
-
构造器详细资料
-
AbstractMockMvcServerSpec
AbstractMockMvcServerSpec()
-
-
方法详细资料
-
filters
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecAdd a global filter.This is delegated to
ConfigurableMockMvcBuilder.addFilters(Filter...).- 指定者:
filters在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
filter
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecAdd a filter for specific URL patterns.This is delegated to
ConfigurableMockMvcBuilder.addFilter(Filter, String...).- 指定者:
filter在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
defaultRequest
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecDefine default request properties that should be merged into all performed requests such that input from the client request override the default properties defined here.This is delegated to
ConfigurableMockMvcBuilder.defaultRequest(RequestBuilder).- 指定者:
defaultRequest在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
alwaysExpect
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecDefine a global expectation that should always be applied to every response.This is delegated to
ConfigurableMockMvcBuilder.alwaysExpect(ResultMatcher).- 指定者:
alwaysExpect在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
dispatcherServletCustomizer
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecAllow customization ofDispatcherServlet.This is delegated to
ConfigurableMockMvcBuilder.addDispatcherServletCustomizer(DispatcherServletCustomizer). -
apply
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecAdd aMockMvcConfigurerthat automates MockMvc setup.This is delegated to
ConfigurableMockMvcBuilder.apply(MockMvcConfigurer).- 指定者:
apply在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
self
-
getMockMvcBuilder
Return the concreteConfigurableMockMvcBuilderto delegate configuration methods and to use to create theMockMvc. -
configureClient
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecProceed to configure and build the test client.- 指定者:
configureClient在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-
build
从接口复制的说明:MockMvcWebTestClient.MockMvcServerSpecShortcut to build the test client.- 指定者:
build在接口中MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
-