Open
Description
I have a use case in which I would like to intercept only certain invocations of a @ParameterizedTest
, namely those where the arguments come from a particular ArgumentsProvider
. Since the information about which ArgumentsProvider
provided the current set of arguments isn't available in e.g. InvocationInterceptor#interceptTestTemplateMethod
, this doesn't seem to be possible today.
TestTemplateInvocationContext#getAdditionalExtensions
would allow doing that, but it can't be populated from an ArgumentsProvider
. I thus propose exposing this functionality via a new getAdditionalExtensions()
method on ArgumentsProvider
.
Deliverables
- Add a new default method
List<Extension> getAdditionalExtensions()
toArgumentsProvider
. InParameterizedTestExtension
, forward the additional extensions to theParameterizedTestInvocationContext
.