程序包的使用
org.springframework.test.web.servlet
使用org.springframework.test.web.servlet的程序包 程序包 说明 org.springframework.test.web.client Contains client-side REST testing support.org.springframework.test.web.servlet Contains server-side support for testing Spring MVC applications.org.springframework.test.web.servlet.htmlunit Server-side support for testing Spring MVC applications withMockMvc
and HtmlUnit.org.springframework.test.web.servlet.htmlunit.webdriver Server-side support for testing Spring MVC applications withMockMvc
and the SeleniumHtmlUnitDriver
.org.springframework.test.web.servlet.request Contains built-inRequestBuilder
implementations.org.springframework.test.web.servlet.result Contains built-inResultMatcher
andResultHandler
implementations.org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilder
implementations.org.springframework.test.web.client使用的org.springframework.test.web.servlet中的类 类 说明 MockMvc Main entry point for server-side Spring MVC test support.org.springframework.test.web.servlet使用的org.springframework.test.web.servlet中的类 类 说明 MockMvc Main entry point for server-side Spring MVC test support.MvcResult Provides access to the result of an executed request.RequestBuilder Builds aMockHttpServletRequest
.ResultActions Allows applying actions, such as expectations, on the result of an executed request.ResultHandler AResultHandler
performs a generic action on the result of an executed request — for example, printing debug information.ResultMatcher AResultMatcher
matches the result of an executed request against some expectation.org.springframework.test.web.servlet.htmlunit使用的org.springframework.test.web.servlet中的类 类 说明 MockMvc Main entry point for server-side Spring MVC test support.org.springframework.test.web.servlet.htmlunit.webdriver使用的org.springframework.test.web.servlet中的类 类 说明 MockMvc Main entry point for server-side Spring MVC test support.org.springframework.test.web.servlet.request使用的org.springframework.test.web.servlet中的类 类 说明 MvcResult Provides access to the result of an executed request.RequestBuilder Builds aMockHttpServletRequest
.SmartRequestBuilder Extended variant of aRequestBuilder
that applies itsorg.springframework.test.web.servlet.request.RequestPostProcessors
as a separate step from theRequestBuilder.buildRequest(javax.servlet.ServletContext)
method.org.springframework.test.web.servlet.result使用的org.springframework.test.web.servlet中的类 类 说明 MvcResult Provides access to the result of an executed request.ResultHandler AResultHandler
performs a generic action on the result of an executed request — for example, printing debug information.ResultMatcher AResultMatcher
matches the result of an executed request against some expectation.org.springframework.test.web.servlet.setup使用的org.springframework.test.web.servlet中的类 类 说明 DispatcherServletCustomizer Strategy interface for customizingDispatcherServlet
instances that are managed byMockMvc
.MockMvc Main entry point for server-side Spring MVC test support.MockMvcBuilder Builds aMockMvc
instance.MockMvcBuilderSupport Base class for MockMvc builder implementations, providing the capability to create aMockMvc
instance.RequestBuilder Builds aMockHttpServletRequest
.ResultHandler AResultHandler
performs a generic action on the result of an executed request — for example, printing debug information.ResultMatcher AResultMatcher
matches the result of an executed request against some expectation.