Skip to content

Commit d46581c

Browse files
committed
Document @⁠EmptySource support for Iterable, Iterator, and ListIterator
Closes #5368
1 parent 8e16bd1 commit d46581c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

documentation/modules/ROOT/pages/writing-tests/parameterized-classes-and-tests.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,12 @@ for parameterized tests that accept a single argument.
249249
- `@NullSource` cannot be used for a parameter that has a primitive type.
250250
* `{EmptySource}`: provides a single _empty_ argument to the annotated
251251
`@ParameterizedClass` or `@ParameterizedTest` for parameters of the following types:
252-
`java.lang.String`, `java.util.Collection` (and concrete subtypes with a `public` no-arg
253-
constructor), `java.util.List`, `java.util.Set`, `java.util.SortedSet`,
254-
`java.util.NavigableSet`, `java.util.Map` (and concrete subtypes with a `public` no-arg
255-
constructor), `java.util.SortedMap`, `java.util.NavigableMap`, primitive arrays (e.g.,
256-
`int[]`, `char[][]`, etc.), object arrays (e.g., `String[]`, `Integer[][]`, etc.).
252+
`java.lang.String`, `java.lang.Iterable`, `java.util.Iterator`, `java.util.ListIterator`
253+
`java.util.Collection` (and concrete subtypes with a `public` no-arg constructor),
254+
`java.util.List`, `java.util.Set`, `java.util.SortedSet`, `java.util.NavigableSet`,
255+
`java.util.Map` (and concrete subtypes with a `public` no-arg constructor),
256+
`java.util.SortedMap`, `java.util.NavigableMap`, primitive arrays (for example, `int[]`,
257+
`char[][]`, etc.), object arrays (for example, `String[]`, `Integer[][]`, etc.).
257258
* `{NullAndEmptySource}`: a _composed annotation_ that combines the functionality of
258259
`@NullSource` and `@EmptySource`.
259260

junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptySource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
*
3434
* <ul>
3535
* <li>{@link java.lang.String}</li>
36+
* <li>{@link java.lang.Iterable}</li>
37+
* <li>{@link java.util.Iterator}</li>
38+
* <li>{@link java.util.ListIterator}</li>
3639
* <li>{@link java.util.Collection} and concrete subtypes with a public no-arg constructor</li>
3740
* <li>{@link java.util.List}</li>
3841
* <li>{@link java.util.Set}</li>

0 commit comments

Comments
 (0)