Spring、Spring Boot 和 TestNG 测试指南 ( 10 )

附录I Spring Mock Objects

Spring提供的Mock Objects有以下这些:

package org.springframework.mock.env

  1. MockEnvironment
  2. MockPropertySource

package org.springframework.mock.jndi

  1. SimpleNamingContext
  2. ExpectedLookupTemplate
  3. SimpleNamingContextBuilder

package org.springframework.mock.web

  1. DelegatingServletInputStream
  2. DelegatingServletOutputStream
  3. HeaderValueHolder
  4. MockAsyncContext
  5. MockBodyContent
  6. MockExpressionEvaluator
  7. MockFilterChain
  8. MockFilterConfig
  9. MockHttpServletRequest
  10. MockHttpServletResponse
  11. MockHttpSession
  12. MockJspWriter
  13. MockMultipartFile
  14. MockMultipartHttpServletRequest
  15. MockPageContext
  16. MockRequestDispatcher
  17. MockServletConfig
  18. MockServletContext
  19. MockSessionCookieConfig
  20. PassThroughFilterChain

附录II Spring Test Utils

Spring提供的[Unit Test Utils][doc-spring-unit-test-utils]有以下这些:

  1. AopTestUtils
  2. AssertionErrors
  3. JsonExpectationsHelper
  4. JsonPathExpectationsHelper
  5. MetaAnnotationUtils
  6. ReflectionTestUtils
  7. XmlExpectationsHelper
  8. XpathExpectationsHelper
  9. ModelAndViewAssert
  10. JdbcTestUtils


相关文章

发表评论

Comment form

(*) 表示必填项

还没有评论。

跳到底部
返回顶部