接口的使用
org.springframework.test.web.servlet.htmlunit.WebRequestMatcher
使用WebRequestMatcher的程序包 程序包 说明 org.springframework.test.web.servlet.htmlunit Server-side support for testing Spring MVC applications withMockMvc
and HtmlUnit.org.springframework.test.web.servlet.htmlunit中WebRequestMatcher的使用
实现WebRequestMatcher的org.springframework.test.web.servlet.htmlunit中的类 修饰符和类型 类 说明 class
HostRequestMatcher
AWebRequestMatcher
that allows matching on the host and optionally the port ofWebRequest#getUrl()
.class
UrlRegexRequestMatcher
AWebRequestMatcher
that allows matching onWebRequest#getUrl().toExternalForm()
using a regular expression.参数类型为WebRequestMatcher的org.springframework.test.web.servlet.htmlunit中的方法 修饰符和类型 方法 说明 T
MockMvcWebConnectionBuilderSupport. useMockMvc(WebRequestMatcher... matchers)
Add additionalWebRequestMatcher
instances that will ensure thatMockMvc
is used to process the request, if such a matcher matches against the web request.参数类型为WebRequestMatcher的org.springframework.test.web.servlet.htmlunit中的构造器 构造器 说明 DelegateWebConnection(WebRequestMatcher matcher, com.gargoylesoftware.htmlunit.WebConnection delegate)