diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java index fc12798a388..5d8d96dd9a1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java @@ -39,13 +39,13 @@ import org.springframework.util.ReflectionUtils; * * * *

Support for loading and accessing @@ -183,8 +183,8 @@ public class TestContextManager { /** * Hook for pre-processing a test class before execution of any * tests within the class. Should be called prior to any framework-specific - * before class methods (e.g., methods annotated with JUnit 4's - * {@link org.junit.BeforeClass @BeforeClass}). + * before class methods — for example, methods annotated with + * JUnit Jupiter's {@link org.junit.jupiter.api.BeforeAll @BeforeAll}. *

An attempt will be made to give each registered * {@link TestExecutionListener} a chance to pre-process the test class * execution. If a listener throws an exception, however, the remaining @@ -257,10 +257,10 @@ public class TestContextManager { * lifecycle callbacks of the underlying test framework — for example, * setting up test fixtures, starting a transaction, etc. *

This method must be called immediately prior to - * framework-specific before lifecycle callbacks (e.g., methods - * annotated with JUnit 4's {@link org.junit.Before @Before}). For historical - * reasons, this method is named {@code beforeTestMethod}. Since the - * introduction of {@link #beforeTestExecution}, a more suitable name for + * framework-specific before lifecycle callbacks — for example, methods + * annotated with JUnit Jupiter's {@link org.junit.jupiter.api.BeforeEach @BeforeEach}. + * For historical reasons, this method is named {@code beforeTestMethod}. Since + * the introduction of {@link #beforeTestExecution}, a more suitable name for * this method might be something like {@code beforeTestSetUp} or * {@code beforeEach}; however, it is unfortunately impossible to rename * this method due to backward compatibility concerns. @@ -299,8 +299,8 @@ public class TestContextManager { * {@linkplain TestContext test context} — for example, for timing * or logging purposes. *

This method must be called after framework-specific - * before lifecycle callbacks (e.g., methods annotated with JUnit 4's - * {@link org.junit.Before @Before}). + * before lifecycle callbacks — for example, methods annotated + * with JUnit Jupiter's {@link org.junit.jupiter.api.BeforeEach @BeforeEach}. *

The managed {@link TestContext} will be updated with the supplied * {@code testInstance} and {@code testMethod}. *

An attempt will be made to give each registered @@ -338,8 +338,8 @@ public class TestContextManager { * {@linkplain TestContext test context} — for example, for timing * or logging purposes. *

This method must be called before framework-specific - * after lifecycle callbacks (e.g., methods annotated with JUnit 4's - * {@link org.junit.After @After}). + * after lifecycle callbacks — for example, methods annotated + * with JUnit Jupiter's {@link org.junit.jupiter.api.AfterEach @AfterEach}. *

The managed {@link TestContext} will be updated with the supplied * {@code testInstance}, {@code testMethod}, and {@code exception}. *

Each registered {@link TestExecutionListener} will be given a chance @@ -398,10 +398,10 @@ public class TestContextManager { * lifecycle callbacks of the underlying test framework — for example, * tearing down test fixtures, ending a transaction, etc. *

This method must be called immediately after - * framework-specific after lifecycle callbacks (e.g., methods - * annotated with JUnit 4's {@link org.junit.After @After}). For historical - * reasons, this method is named {@code afterTestMethod}. Since the - * introduction of {@link #afterTestExecution}, a more suitable name for + * framework-specific after lifecycle callbacks — for example, methods + * annotated with JUnit Jupiter's {@link org.junit.jupiter.api.AfterEach @AfterEach}. + * For historical reasons, this method is named {@code afterTestMethod}. Since + * the introduction of {@link #afterTestExecution}, a more suitable name for * this method might be something like {@code afterTestTearDown} or * {@code afterEach}; however, it is unfortunately impossible to rename * this method due to backward compatibility concerns. @@ -458,8 +458,8 @@ public class TestContextManager { /** * Hook for post-processing a test class after execution of all * tests within the class. Should be called after any framework-specific - * after class methods (e.g., methods annotated with JUnit 4's - * {@link org.junit.AfterClass @AfterClass}). + * after class methods — for example, methods annotated with + * JUnit Jupiter's {@link org.junit.jupiter.api.AfterAll @AfterAll}. *

Each registered {@link TestExecutionListener} will be given a chance * to perform its post-processing. If a listener throws an exception, the * remaining registered listeners will still be called. After all listeners