接口的使用
org.springframework.test.context.TestExecutionListener
使用TestExecutionListener的程序包 程序包 说明 org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.event Test event support classes for the Spring TestContext Framework.org.springframework.test.context.jdbc JDBC support classes for the Spring TestContext Framework, including support for declarative SQL script execution via@Sql
.org.springframework.test.context.support Support classes for the Spring TestContext Framework.org.springframework.test.context.transaction Transactional support classes for the Spring TestContext Framework.org.springframework.test.context.web Web support classes for the Spring TestContext Framework.org.springframework.test.context中TestExecutionListener的使用
返回变量类型为TestExecutionListener的类型的org.springframework.test.context中的方法 修饰符和类型 方法 说明 List<TestExecutionListener>
TestContextBootstrapper. getTestExecutionListeners()
Get a list of newly instantiatedTestExecutionListeners
for the test class in theBootstrapContext
associated with this bootstrapper.List<TestExecutionListener>
TestContextManager. getTestExecutionListeners()
Get the currentTestExecutionListeners
registered for thisTestContextManager
.Class<? extends TestExecutionListener>[]
listeners()
TheTestExecutionListeners
to register with theTestContextManager
.Class<? extends TestExecutionListener>[]
value()
Alias forTestExecutionListeners.listeners()
.参数类型为TestExecutionListener的org.springframework.test.context中的方法 修饰符和类型 方法 说明 void
TestContextManager. registerTestExecutionListeners(TestExecutionListener... testExecutionListeners)
Register the supplied array ofTestExecutionListeners
by appending them to the list of listeners used by thisTestContextManager
.类型变量类型为TestExecutionListener的org.springframework.test.context中的方法参数 修饰符和类型 方法 说明 void
TestContextManager. registerTestExecutionListeners(List<TestExecutionListener> testExecutionListeners)
Register the supplied list ofTestExecutionListeners
by appending them to the list of listeners used by thisTestContextManager
.org.springframework.test.context.event中TestExecutionListener的使用
实现TestExecutionListener的org.springframework.test.context.event中的类 修饰符和类型 类 说明 class
EventPublishingTestExecutionListener
TestExecutionListener
that publishes test execution events to theApplicationContext
for the currently executing test.org.springframework.test.context.jdbc中TestExecutionListener的使用
实现TestExecutionListener的org.springframework.test.context.jdbc中的类 修饰符和类型 类 说明 class
SqlScriptsTestExecutionListener
TestExecutionListener
that provides support for executing SQLscripts
and inlinedstatements
configured via the@Sql
annotation.org.springframework.test.context.support中TestExecutionListener的使用
实现TestExecutionListener的org.springframework.test.context.support中的类 修饰符和类型 类 说明 class
AbstractDirtiesContextTestExecutionListener
Abstract base class forTestExecutionListener
implementations that provide support for marking theApplicationContext
associated with a test as dirty for both test classes and test methods annotated with the@DirtiesContext
annotation.class
AbstractTestExecutionListener
Abstract ordered implementation of theTestExecutionListener
API.class
DependencyInjectionTestExecutionListener
TestExecutionListener
which provides support for dependency injection and initialization of test instances.class
DirtiesContextBeforeModesTestExecutionListener
TestExecutionListener
which provides support for marking theApplicationContext
associated with a test as dirty for both test classes and test methods annotated with the@DirtiesContext
annotation.class
DirtiesContextTestExecutionListener
TestExecutionListener
which provides support for marking theApplicationContext
associated with a test as dirty for both test classes and test methods annotated with the@DirtiesContext
annotation.返回变量类型为TestExecutionListener的类型的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 protected Set<Class<? extends TestExecutionListener>>
AbstractTestContextBootstrapper. getDefaultTestExecutionListenerClasses()
Get the defaultTestExecutionListener
classes for this bootstrapper.List<TestExecutionListener>
AbstractTestContextBootstrapper. getTestExecutionListeners()
org.springframework.test.context.transaction中TestExecutionListener的使用
实现TestExecutionListener的org.springframework.test.context.transaction中的类 修饰符和类型 类 说明 class
TransactionalTestExecutionListener
TestExecutionListener
that provides support for executing tests within test-managed transactions by honoring Spring's@Transactional
annotation.org.springframework.test.context.web中TestExecutionListener的使用
实现TestExecutionListener的org.springframework.test.context.web中的类 修饰符和类型 类 说明 class
ServletTestExecutionListener
TestExecutionListener
which provides mock Servlet API support toWebApplicationContexts
loaded by the Spring TestContext Framework.