Skip to content

Commit e323204

Browse files
committed
Document #1139 in User Guide and release notes
1 parent fa914c0 commit e323204

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

documentation/src/docs/asciidoc/link-attributes.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ endif::[]
203203
:Parameter: {javadoc-root}/org.junit.jupiter.params/org/junit/jupiter/params/Parameter.html[@Parameter]
204204
:ParameterizedClass: {javadoc-root}/org.junit.jupiter.params/org/junit/jupiter/params/ParameterizedClass.html[@ParameterizedClass]
205205
:ParameterizedTest: {javadoc-root}/org.junit.jupiter.params/org/junit/jupiter/params/ParameterizedTest.html[@ParameterizedTest]
206+
:ParameterInfo: {javadoc-root}/org.junit.jupiter.params/org/junit/jupiter/params/support/ParameterInfo.html[ParameterInfo]
206207
:ValueArgumentsProvider: {junit5-repo}/blob/main/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java[ValueArgumentsProvider]
207208
// Jupiter Engine
208209
:junit-jupiter-engine: {javadoc-root}/org.junit.jupiter.engine/org/junit/jupiter/engine/package-summary.html[junit-jupiter-engine]

documentation/src/docs/asciidoc/release-notes/release-notes-5.13.0-M1.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ repository on GitHub.
5959
tests in the class template or to set up each invocation of the class template
6060
differently. Please refer to the
6161
<<../user-guide/index.adoc#writing-tests-class-templates, User Guide>> for details.
62+
* New `BeforeClassTemplateInvocationCallback` and `AfterClassTemplateInvocationCallback`
63+
extension callback interfaces allow implementing extensions that are invoked before and
64+
after each invocation of a class template.
6265
* New `@ParameterizedClass` support that builds on `@ClassTemplate` and allows declaring a
6366
top-level or `@Nested` test class as a parameterized test class to be invoked multiple
6467
times with different arguments. The same `@...Source` annotations supported with
@@ -68,14 +71,16 @@ repository on GitHub.
6871
* New `@ParameterizedClass`-specific
6972
`@BeforeParameterizedClassInvocation`/`@AfterParameterizedClassInvocation` lifecycle
7073
methods that are invoked once before/after each invocation of the parameterized class.
74+
* Provide access to the parameters and resolved arguments of a `@ParameterizedTest` or
75+
`@ParameterizedClass` by storing `ParameterInfo` in the `ExtensionContext.Store` for
76+
retrieval by other extensions. Please refer to the
77+
link:../api/org.junit.jupiter.params/org/junit/jupiter/params/support/ParameterInfo.html[Javadoc]
78+
for details.
7179
* New `@SentenceFragment` annotation which allows one to supply custom text for individual
7280
sentence fragments when using the `IndicativeSentences` `DisplayNameGenerator`. See the
7381
updated documentation in the
7482
<<../user-guide/index.adoc#writing-tests-display-name-generator, User Guide>> for an
7583
example.
76-
* New `BeforeClassTemplateInvocationCallback` and `AfterClassTemplateInvocationCallback`
77-
extension callback interfaces allow implementing extensions that are invoked before and
78-
after each invocation of a class template.
7984
* New `TestTemplateInvocationContext.prepareInvocation(ExtensionContext)` callback method
8085
which allows extensions to prepare the `ExtensionContext` before the test template
8186
method is invoked. This may be used, for example, to store entries in the

documentation/src/docs/asciidoc/user-guide/writing-tests.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,15 @@ method, you must specify the `autoCloseArguments = false` on the `{Parameterized
17691769
invocations.
17701770
====
17711771

1772+
[[writing-tests-parameterized-tests-consuming-arguments-other-extensions]]
1773+
===== Other Extensions
1774+
1775+
Other extensions can access the parameters and resolved arguments of a parameterized test
1776+
or class by retrieving a `{ParameterInfo}` object from the `{ExtensionContext_Store}`.
1777+
Please refer to the Javadoc of `{ParameterInfo}` for details.
1778+
1779+
[[writing-tests-parameterized-tests-argument-aggregation]]
1780+
17721781
[[writing-tests-parameterized-tests-sources]]
17731782
==== Sources of Arguments
17741783

0 commit comments

Comments
 (0)