diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc index 92c97ce8dab6..559a9a288649 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc @@ -85,7 +85,7 @@ JUnit repository on GitHub. * Extensions based on `TestTemplateInvocationContextProvider` can now allow returning zero invocation contexts by overriding the new `mayReturnZeroTestTemplateInvocationContexts` method. -* The new `@ParameterizedTest(requireArguments = false)` attribute allows to specify that +* The new `@ParameterizedTest(allowZeroInvocations = true)` attribute allows to specify that the absence of arguments is expected in some cases and should not cause a test failure. * Allow determining "shared resources" at runtime via the new `@ResourceLock#providers` attribute that accepts implementations of `ResourceLocksProvider`. diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java index 03741d19f1fd..a14309deb7eb 100644 --- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java +++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java @@ -293,18 +293,18 @@ boolean autoCloseArguments() default true; /** - * Configure whether at least one set of arguments is required for this + * Configure whether zero invocations are allowed for this * parameterized test. * - *
Set this attribute to {@code false} if the absence of arguments is + *
Set this attribute to {@code true} if the absence of arguments is * expected in some cases and should not cause a test failure. * - *
Defaults to {@code true}. + *
Defaults to {@code false}.
*
* @since 5.12
*/
@API(status = EXPERIMENTAL, since = "5.12")
- boolean requireArguments() default true;
+ boolean allowZeroInvocations() default false;
/**
* Configure how the number of arguments provided by an {@link ArgumentsSource} are validated.
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
index 74ff653e15cc..8aed7644f2d8 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
@@ -86,7 +86,7 @@ public Stream