Class ParameterizedTestInvocationContext

    • Method Detail

      • getDisplayName

        public java.lang.String getDisplayName​(int invocationIndex)
        Description copied from interface: TestTemplateInvocationContext
        Get the display name for this invocation.

        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.

        Specified by:
        getDisplayName in interface TestTemplateInvocationContext
        Parameters:
        invocationIndex - the index of this invocation (1-based).
        Returns:
        the display name for this invocation; never null or blank
      • getAdditionalExtensions

        public java.util.List<Extension> getAdditionalExtensions()
        Description copied from interface: TestTemplateInvocationContext
        Get the additional extensions for this invocation.

        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.

        Specified by:
        getAdditionalExtensions in interface TestTemplateInvocationContext
        Returns:
        the additional extensions for this invocation; never null or containing null elements, but potentially empty