The spring-test
module supports the unit testing and integration testing of Spring components with JUnit or TestNG. It provides consistent loading of SpringApplicationContext
s and caching of those contexts. It also provides mock objects that you can use to test your code in isolation.
spring-test
模块支持使用JUnit
或TestNG
对Spring
组件进行单元测试和集成测试。 它提供了SpringApplicationContexts
的一致加载和这些上下文的缓存。 它还提供了 mock objects(模拟对象),您可以使用它来单独测试您的代码。