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

pack-priv Class RepetitionExtension

extends Object
implements ParameterResolver, TestWatcher, ExecutionCondition
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.ExecutionCondition, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestWatcher, org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.TestInstantiationAwareExtension
Static Imports
org.junit.jupiter.api.extension.ConditionEvaluationResult.disabled, .ConditionEvaluationResult.enabled

RepetitionExtension implements the following extension APIs to support repetitions of a @RepeatedTest method.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final DefaultRepetitionInfo

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ConditionEvaluationResult
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 RepetitionInfo
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.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

repetitionInfoback to summary
private final DefaultRepetitionInfo repetitionInfo

Constructor Detail

RepetitionExtensionback to summary
pack-priv RepetitionExtension(DefaultRepetitionInfo repetitionInfo)

Method Detail

evaluateExecutionConditionback to summary
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context)

Implements org.junit.jupiter.api.extension.ExecutionCondition.evaluateExecutionCondition.

Doc from org.junit.jupiter.api.extension.ExecutionCondition.evaluateExecutionCondition.

Evaluate this condition for the supplied ExtensionContext.

An enabled result indicates that the container or test should be executed; whereas, a disabled result indicates that the container or test should not be executed.

Annotations
@Override
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 RepetitionInfo 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
testFailedback to summary
public void testFailed(ExtensionContext context, @Nullable Throwable cause)
Annotations
@Override