Skip to content

Commit 0f25c75

Browse files
committed
Document TestExecutionListener implementations introduced in 6.2
Closes gh-33661
1 parent 0e8316e commit 0f25c75

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

framework-docs/modules/ROOT/pages/testing/testcontext-framework/tel-config.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ by default, exactly in the following order:
1010
annotation for "`before`" modes.
1111
* `ApplicationEventsTestExecutionListener`: Provides support for
1212
xref:testing/testcontext-framework/application-events.adoc[`ApplicationEvents`].
13+
* `MockitoTestExecutionListener`: Initializes and closes mocks configured using `@MockitoBean` or `@MockitoSpyBean`.
1314
* `DependencyInjectionTestExecutionListener`: Provides dependency injection for the test
1415
instance.
1516
* `MicrometerObservationRegistryTestExecutionListener`: Provides support for
@@ -24,6 +25,8 @@ by default, exactly in the following order:
2425
annotation.
2526
* `EventPublishingTestExecutionListener`: Publishes test execution events to the test's
2627
`ApplicationContext` (see xref:testing/testcontext-framework/test-execution-events.adoc[Test Execution Events]).
28+
* `MockitoResetTestExecutionListener`: Resets mocks as configured by `@MockitoBean` or `@MockitoSpyBean`.
29+
* `BeanOverrideTestExecutionListener`: Provides support for xref:testing/testcontext-framework/bean-overriding.adoc[] .
2730

2831
[[testcontext-tel-config-registering-tels]]
2932
== Registering `TestExecutionListener` Implementations

spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java

+8
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,26 @@
6666
* DirtiesContextBeforeModesTestExecutionListener}</li>
6767
* <li>{@link org.springframework.test.context.event.ApplicationEventsTestExecutionListener
6868
* ApplicationEventsTestExecutionListener}</li>
69+
* <li>{@link org.springframework.test.context.bean.override.mockito.MockitoTestExecutionListener
70+
* MockitoTestExecutionListener}</li>
6971
* <li>{@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener
7072
* DependencyInjectionTestExecutionListener}</li>
7173
* <li>{@link org.springframework.test.context.observation.MicrometerObservationRegistryTestExecutionListener
7274
* MicrometerObservationRegistryTestExecutionListener}</li>
7375
* <li>{@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
7476
* DirtiesContextTestExecutionListener}</li>
77+
* <li>{@link org.springframework.test.context.support.CommonCachesTestExecutionListener
78+
* CommonCachesTestExecutionListener}</li>
7579
* <li>{@link org.springframework.test.context.transaction.TransactionalTestExecutionListener
7680
* TransactionalTestExecutionListener}</li>
7781
* <li>{@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
7882
* SqlScriptsTestExecutionListener}</li>
7983
* <li>{@link org.springframework.test.context.event.EventPublishingTestExecutionListener
8084
* EventPublishingTestExecutionListener}</li>
85+
* <li>{@link org.springframework.test.context.bean.override.mockito.MockitoResetTestExecutionListener
86+
* MockitoResetTestExecutionListener}</li>
87+
* <li>{@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
88+
* BeanOverrideTestExecutionListener}</li>
8189
* </ul>
8290
*
8391
* @author Sam Brannen

spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java

+4
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,15 @@
8282
* @see org.springframework.test.context.web.ServletTestExecutionListener
8383
* @see org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
8484
* @see org.springframework.test.context.event.ApplicationEventsTestExecutionListener
85+
* @see org.springframework.test.context.bean.override.mockito.MockitoTestExecutionListener
8586
* @see org.springframework.test.context.support.DependencyInjectionTestExecutionListener
8687
* @see org.springframework.test.context.support.DirtiesContextTestExecutionListener
88+
* @see org.springframework.test.context.support.CommonCachesTestExecutionListener
8789
* @see org.springframework.test.context.transaction.TransactionalTestExecutionListener
8890
* @see org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
8991
* @see org.springframework.test.context.event.EventPublishingTestExecutionListener
92+
* @see org.springframework.test.context.bean.override.mockito.MockitoResetTestExecutionListener
93+
* @see org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
9094
*/
9195
@AliasFor("value")
9296
Class<? extends TestExecutionListener>[] listeners() default {};

0 commit comments

Comments
 (0)