Top Description Constructors Methods
org.junit.jupiter.engine.extension

pack-priv Class TestReporterParameterResolver

extends Object
implements ParameterResolver
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.TestInstantiationAwareExtension, org.junit.jupiter.api.extension.Extension
Imports
org.junit.jupiter.api.TestReporter, org.junit.jupiter.api.extension.ExtensionContext, .ParameterContext, .ParameterResolver

ParameterResolver that injects a TestReporter.
Since
5.0

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public TestInstantiationAwareExtension.ExtensionContextScope
getTestInstantiationExtensionContextScope(ExtensionContext rootContext)

Overrides default org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Determine whether this extension should receive a test-method scoped ExtensionContext during the instantiation of test classes or processing of test instances.

public TestReporter
resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Resolve an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

public boolean
supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Determine if this resolver supports resolution of an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TestReporterParameterResolverback to summary
pack-priv TestReporterParameterResolver()

Method Detail

getTestInstantiationExtensionContextScopeback to summary
public TestInstantiationAwareExtension.ExtensionContextScope getTestInstantiationExtensionContextScope(ExtensionContext rootContext)

Overrides default org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Doc from org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Determine whether this extension should receive a test-method scoped ExtensionContext during the instantiation of test classes or processing of test instances.

If an extension returns TEST_METHOD from this method, methods defined in the following extension APIs will be called with a test-method scoped ExtensionContext instead of a test-class scoped context. Note, however, that a test-class scoped context will always be supplied if the PER_CLASS test instance lifecycle is used.

When a test-method scoped ExtensionContext is supplied, implementations of the above extension APIs will observe the following differences.

Note

The behavior which is enabled by returning TEST_METHOD from this method will become the default in future versions of JUnit. To ensure forward compatibility, extension authors are therefore advised to opt into this feature, even if they do not require the new functionality.

Annotations
@Override
resolveParameterback to summary
public TestReporter resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Doc from org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Resolve an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

This method is only called by the framework if supportsParameter previously returned true for the same ParameterContext and ExtensionContext.

The java.lang.reflect.Method or java.lang.reflect.Constructor in which the parameter is declared can be retrieved via ParameterContext#getDeclaringExecutable().

Annotations
@Override
supportsParameterback to summary
public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Doc from org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Determine if this resolver supports resolution of an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

The java.lang.reflect.Method or java.lang.reflect.Constructor in which the parameter is declared can be retrieved via ParameterContext#getDeclaringExecutable().

Annotations
@Override