class ParameterizedTestInvocationContext extends java.lang.Object implements TestTemplateInvocationContext
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
arguments |
private ParameterizedTestNameFormatter |
formatter |
private ParameterizedTestMethodContext |
methodContext |
Constructor and Description |
---|
ParameterizedTestInvocationContext(ParameterizedTestNameFormatter formatter,
ParameterizedTestMethodContext methodContext,
java.lang.Object[] arguments) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Extension> |
getAdditionalExtensions()
Get the additional extensions for this invocation.
|
java.lang.String |
getDisplayName(int invocationIndex)
Get the display name for this invocation.
|
private final ParameterizedTestNameFormatter formatter
private final ParameterizedTestMethodContext methodContext
private final java.lang.Object[] arguments
ParameterizedTestInvocationContext(ParameterizedTestNameFormatter formatter, ParameterizedTestMethodContext methodContext, java.lang.Object[] arguments)
public java.lang.String getDisplayName(int invocationIndex)
TestTemplateInvocationContext
The supplied invocationIndex
is incremented by the framework
with each test invocation. Thus, in the case of multiple active
providers, only the
first active provider receives indices starting with 1
.
The default implementation returns the supplied invocationIndex
wrapped in brackets — for example, [1]
, [42]
, etc.
getDisplayName
in interface TestTemplateInvocationContext
invocationIndex
- the index of this invocation (1-based).null
or blankpublic java.util.List<Extension> getAdditionalExtensions()
TestTemplateInvocationContext
The extensions provided by this method will only be used for this
invocation of the test template. Thus, it does not make sense to return
an extension that acts solely on the container level (e.g.
BeforeAllCallback
).
The default implementation returns an empty list.
getAdditionalExtensions
in interface TestTemplateInvocationContext
null
or containing null
elements, but potentially empty