diff --git a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc index a0fc45f2934c..e2431391e330 100644 --- a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc +++ b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc @@ -751,8 +751,8 @@ NOTE: Beginning with Java 16, `@BeforeAll` and `@AfterAll` methods can be declar `static` in `@Nested` test classes. If you are authoring tests using the Kotlin programming language, you may also find it -easier to implement `@BeforeAll` and `@AfterAll` methods by switching to the "per-class" -test instance lifecycle mode. +easier to implement `@BeforeAll` and `@AfterAll` methods and also factory methods for +`@MethodSource` by switching to the "per-class" test instance lifecycle mode. [[writing-tests-test-instance-lifecycle-changing-default]] ==== Changing the Default Test Instance Lifecycle diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java index 0e6ae3758b63..ac7840503c0f 100644 --- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java +++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java @@ -51,7 +51,8 @@ *
  • Declaration of {@code @BeforeAll} and {@code @AfterAll} on interface * {@code default} methods.
  • *
  • Simplified declaration of non-static {@code @BeforeAll} and {@code @AfterAll} - * methods in test classes implemented with the Kotlin programming language.
  • + * methods and also factory methods for {@code @MethodSource} in test classes + * implemented with the Kotlin programming language. * * *

    {@code @TestInstance} may also be used as a meta-annotation in order to