接口的使用
cn.taketoday.test.web.servlet.client.MockMvcWebTestClient.ControllerSpec
程序包
说明
Support for testing Web MVC applications via
WebTestClient
with MockMvc for server request
handling.-
cn.taketoday.test.web.servlet.client中MockMvcWebTestClient.ControllerSpec的使用
修饰符和类型类说明(专用程序包) classSimple wrapper around aStandaloneMockMvcBuilderthat implementsMockMvcWebTestClient.ControllerSpec.修饰符和类型方法说明MockMvcWebTestClient.ControllerSpec.asyncRequestTimeout(long timeout) Specify the timeout value for async execution.MockMvcWebTestClient.bindToController(Object... controllers) Begin creating aWebTestClientby providing the@Controllerinstance(s) to handle requests with.MockMvcWebTestClient.ControllerSpec.contentNegotiationManager(cn.taketoday.web.accept.ContentNegotiationManager manager) Set a ContentNegotiationManager.MockMvcWebTestClient.ControllerSpec.controllerAdvice(Object... controllerAdvice) RegisterControllerAdviceMockMvcWebTestClient.ControllerSpec.conversionService(cn.taketoday.format.support.FormattingConversionService conversionService) Provide a conversion service.MockMvcWebTestClient.ControllerSpec.customArgumentResolvers(cn.taketoday.web.bind.resolver.ParameterResolvingStrategy... argumentResolvers) Provide custom argument resolvers.MockMvcWebTestClient.ControllerSpec.customHandlerMapping(Supplier<cn.taketoday.web.handler.method.RequestMappingHandlerMapping> factory) Configure factory for a customRequestMappingHandlerMapping.MockMvcWebTestClient.ControllerSpec.customReturnValueHandlers(cn.taketoday.web.handler.result.HandlerMethodReturnValueHandler... handlers) Provide custom return value handlers.MockMvcWebTestClient.ControllerSpec.flashMapManager(cn.taketoday.web.view.RedirectModelManager flashMapManager) Provide a custom FlashMapManager.MockMvcWebTestClient.ControllerSpec.handlerExceptionHandlers(cn.taketoday.web.HandlerExceptionHandler... exceptionResolvers) Set the HandlerExceptionHandler types to use.MockMvcWebTestClient.ControllerSpec.interceptors(cn.taketoday.web.HandlerInterceptor... interceptors) Add global interceptors.MockMvcWebTestClient.ControllerSpec.localeResolver(cn.taketoday.web.LocaleResolver localeResolver) Provide the LocaleResolver to use.MockMvcWebTestClient.ControllerSpec.mappedInterceptors(String[] pathPatterns, cn.taketoday.web.HandlerInterceptor... interceptors) Add interceptors for specific patterns.MockMvcWebTestClient.ControllerSpec.messageConverters(cn.taketoday.http.converter.HttpMessageConverter<?>... messageConverters) Set the message converters to use.MockMvcWebTestClient.ControllerSpec.placeholderValue(String name, Object value) Configure placeholder values to use.MockMvcWebTestClient.ControllerSpec.singleView(cn.taketoday.web.view.View view) Set up a singleViewResolverwith a fixed view.MockMvcWebTestClient.ControllerSpec.useTrailingSlashPatternMatch(boolean useTrailingSlashPatternMatch) Whether to match trailing slashes.MockMvcWebTestClient.ControllerSpec.validator(cn.taketoday.validation.Validator validator) Provide a customValidator.MockMvcWebTestClient.ControllerSpec.viewResolvers(cn.taketoday.web.view.ViewResolver... resolvers) Set up view resolution.