程序包的使用
org.springframework.test.web.servlet.setup
使用org.springframework.test.web.servlet.setup的程序包 程序包 说明 org.springframework.test.web.servlet.htmlunit Server-side support for testing Spring MVC applications withMockMvcand HtmlUnit.org.springframework.test.web.servlet.htmlunit.webdriver Server-side support for testing Spring MVC applications withMockMvcand the SeleniumHtmlUnitDriver.org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilderimplementations.org.springframework.test.web.servlet.htmlunit使用的org.springframework.test.web.servlet.setup中的类 类 说明 MockMvcConfigurer Contract for customizing aConfigurableMockMvcBuilderin some specific way, e.g. a 3rd party library that wants to provide shortcuts for setting up a MockMvc.org.springframework.test.web.servlet.htmlunit.webdriver使用的org.springframework.test.web.servlet.setup中的类 类 说明 MockMvcConfigurer Contract for customizing aConfigurableMockMvcBuilderin some specific way, e.g. a 3rd party library that wants to provide shortcuts for setting up a MockMvc.org.springframework.test.web.servlet.setup使用的org.springframework.test.web.servlet.setup中的类 类 说明 AbstractMockMvcBuilder Abstract implementation ofMockMvcBuilderwith common methods for configuring filters, default request properties, global expectations and global result actions.ConfigurableMockMvcBuilder Defines common methods for building aMockMvc.DefaultMockMvcBuilder A concrete implementation ofAbstractMockMvcBuilderthat provides theWebApplicationContextsupplied to it as a constructor argument.MockMvcConfigurer Contract for customizing aConfigurableMockMvcBuilderin some specific way, e.g. a 3rd party library that wants to provide shortcuts for setting up a MockMvc.SharedHttpSessionConfigurer MockMvcConfigurerthat stores and re-uses the HTTP session across multiple requests performed through the sameMockMvcinstance.StandaloneMockMvcBuilder 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.