Uses of Interface
org.junit.jupiter.api.extension.ExtensionContext
Packages that use ExtensionContext
Package
Description
JUnit Jupiter API for writing extensions.
JUnit Jupiter API support for writing extensions.
IO-related support in JUnit Jupiter.
Configuration specific to the JUnit Jupiter test engine.
Test descriptors used within the JUnit Jupiter test engine.
Internal classes for test execution within the JUnit Jupiter test engine.
Test extensions specific to the JUnit Jupiter test engine.
Deprecated extensions that provide support for conditional test
execution features of JUnit 4 (e.g., the
@Ignore
annotation) within JUnit Jupiter.Deprecated extensions which provide (limited) support for JUnit 4
rules within JUnit Jupiter.
JUnit Jupiter extension for parameterized tests.
ArgumentsProvider
implementations and their corresponding
ArgumentsSource
annotations.Support classes for building
providers
and
converters
for arguments.
-
Uses of ExtensionContext in org.junit.jupiter.api.extension
Methods in org.junit.jupiter.api.extension that return ExtensionContextMethods in org.junit.jupiter.api.extension that return types with arguments of type ExtensionContextModifier and TypeMethodDescriptionExtensionContext.getParent()Get the parent extension context, if available.Methods in org.junit.jupiter.api.extension with parameters of type ExtensionContextModifier and TypeMethodDescriptionvoidAfterAllCallback.afterAll(ExtensionContext context) Callback that is invoked once after all tests in the current container.voidAfterClassTemplateInvocationCallback.afterClassTemplateInvocation(ExtensionContext context) Callback that is invoked after each invocation of a container template.voidAfterEachCallback.afterEach(ExtensionContext context) Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.voidAfterTestExecutionCallback.afterTestExecution(ExtensionContext context) Callback that is invoked immediately after an individual test has been executed but before any user-defined teardown methods have been executed for that test.voidBeforeAllCallback.beforeAll(ExtensionContext context) Callback that is invoked once before all tests in the current container.voidBeforeClassTemplateInvocationCallback.beforeClassTemplateInvocation(ExtensionContext context) Callback that is invoked before each invocation of a container template.voidBeforeEachCallback.beforeEach(ExtensionContext context) Callback that is invoked before an individual test and any user-defined setup methods for that test have been executed.voidBeforeTestExecutionCallback.beforeTestExecution(ExtensionContext context) Callback that is invoked immediately before an individual test is executed but after any user-defined setup methods have been executed for that test.voidPreInterruptCallback.beforeThreadInterrupt(PreInterruptContext preInterruptContext, ExtensionContext extensionContext) Callback that is invoked before aThreadis interrupted withThread.interrupt().TestInstanceFactory.createTestInstance(TestInstanceFactoryContext factoryContext, ExtensionContext extensionContext) Callback for creating a test instance for the supplied context.ExecutionCondition.evaluateExecutionCondition(ExtensionContext context) Evaluate this condition for the suppliedExtensionContext.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope(ExtensionContext rootContext) Determine whether this extension should receive a test-method scopedExtensionContextduring the instantiation of test classes or processing of test instances.default voidLifecycleMethodExecutionExceptionHandler.handleAfterAllMethodExecutionException(ExtensionContext context, Throwable throwable) Handle the suppliedThrowablethat was thrown during execution of a@AfterAlllifecycle method.default voidLifecycleMethodExecutionExceptionHandler.handleAfterEachMethodExecutionException(ExtensionContext context, Throwable throwable) Handle the suppliedThrowablethat was thrown during execution of a@AfterEachlifecycle method.default voidLifecycleMethodExecutionExceptionHandler.handleBeforeAllMethodExecutionException(ExtensionContext context, Throwable throwable) Handle the suppliedThrowablethat was thrown during execution of a@BeforeAlllifecycle method.default voidLifecycleMethodExecutionExceptionHandler.handleBeforeEachMethodExecutionException(ExtensionContext context, Throwable throwable) Handle the suppliedThrowablethat was thrown during execution of a@BeforeEachlifecycle method.voidTestExecutionExceptionHandler.handleTestExecutionException(ExtensionContext context, Throwable throwable) Handle the suppliedthrowable.default voidInvocationInterceptor.interceptAfterAllMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of an@AfterAllmethod.default voidInvocationInterceptor.interceptAfterEachMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of an@AfterEachmethod.default voidInvocationInterceptor.interceptBeforeAllMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a@BeforeAllmethod.default voidInvocationInterceptor.interceptBeforeEachMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a@BeforeEachmethod.default voidInvocationInterceptor.interceptDynamicTest(InvocationInterceptor.Invocation<@Nullable Void> invocation, DynamicTestInvocationContext invocationContext, ExtensionContext extensionContext) Intercept the invocation of aDynamicTest.default <T> TInvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<Constructor<T>> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a test class constructor.InvocationInterceptor.interceptTestFactoryMethod(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a@TestFactorymethod, such as a@RepeatedTestor@ParameterizedTestmethod.default voidInvocationInterceptor.interceptTestMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a@Testmethod.default voidInvocationInterceptor.interceptTestTemplateMethod(InvocationInterceptor.Invocation<@Nullable Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) Intercept the invocation of a@TestTemplatemethod.default booleanClassTemplateInvocationContextProvider.mayReturnZeroClassTemplateInvocationContexts(ExtensionContext context) Signal that this provider may provide zero invocation contexts for the class template represented by the suppliedcontext.default booleanTestTemplateInvocationContextProvider.mayReturnZeroTestTemplateInvocationContexts(ExtensionContext context) Signal that this provider may provide zero invocation contexts for the test template method represented by the suppliedcontext.voidTestInstancePostProcessor.postProcessTestInstance(Object testInstance, ExtensionContext context) Callback for post-processing the supplied test instance.voidTestInstancePreConstructCallback.preConstructTestInstance(TestInstanceFactoryContext factoryContext, ExtensionContext context) Callback invoked prior to test instances being constructed.voidTestInstancePreDestroyCallback.preDestroyTestInstance(ExtensionContext context) Callback for processing test instances before they are destroyed.static voidTestInstancePreDestroyCallback.preDestroyTestInstances(ExtensionContext context, Consumer<Object> callback) Utility method for processing all test instances of anExtensionContextthat are not present in any of its parent contexts.default voidClassTemplateInvocationContext.prepareInvocation(ExtensionContext context) Prepare the imminent invocation of the class template.default voidTestTemplateInvocationContext.prepareInvocation(ExtensionContext context) Prepare the imminent invocation of the test template.Stream<? extends ClassTemplateInvocationContext> ClassTemplateInvocationContextProvider.provideClassTemplateInvocationContexts(ExtensionContext context) Provide invocation contexts for the class template represented by the suppliedcontext.Stream<? extends TestTemplateInvocationContext> TestTemplateInvocationContextProvider.provideTestTemplateInvocationContexts(ExtensionContext context) Provide invocation contexts for the test template method represented by the suppliedcontext.ParameterResolver.resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) Resolve an argument for theParameterin the suppliedParameterContextfor the suppliedExtensionContext.booleanClassTemplateInvocationContextProvider.supportsClassTemplate(ExtensionContext context) Determine if this provider supports providing invocation contexts for the class template represented by the suppliedcontext.booleanParameterResolver.supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) Determine if this resolver supports resolution of an argument for theParameterin the suppliedParameterContextfor the suppliedExtensionContext.booleanTestTemplateInvocationContextProvider.supportsTestTemplate(ExtensionContext context) Determine if this provider supports providing invocation contexts for the test template method represented by the suppliedcontext.default voidTestWatcher.testAborted(ExtensionContext context, @Nullable Throwable cause) Invoked after a test has been aborted.default voidTestWatcher.testDisabled(ExtensionContext context, Optional<String> reason) Invoked after a disabled test has been skipped.default voidTestWatcher.testFailed(ExtensionContext context, @Nullable Throwable cause) Invoked after a test has failed.default voidTestWatcher.testSuccessful(ExtensionContext context) Invoked after a test has completed successfully. -
Uses of ExtensionContext in org.junit.jupiter.api.extension.support
Methods in org.junit.jupiter.api.extension.support with parameters of type ExtensionContextModifier and TypeMethodDescriptionabstract TTypeBasedParameterResolver.resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) final booleanTypeBasedParameterResolver.supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) -
Uses of ExtensionContext in org.junit.jupiter.api.io
Methods in org.junit.jupiter.api.io with parameters of type ExtensionContextModifier and TypeMethodDescriptionTempDirFactory.createTempDirectory(AnnotatedElementContext elementContext, ExtensionContext extensionContext) Create a new temporary directory.TempDirFactory.Standard.createTempDirectory(AnnotatedElementContext elementContext, ExtensionContext extensionContext) -
Uses of ExtensionContext in org.junit.jupiter.engine.config
Methods in org.junit.jupiter.engine.config with parameters of type ExtensionContextModifier and TypeMethodDescriptionEnumConfigurationParameterConverter.get(ExtensionContext extensionContext, String key) -
Uses of ExtensionContext in org.junit.jupiter.engine.descriptor
Methods in org.junit.jupiter.engine.descriptor with parameters of type ExtensionContextModifier and TypeMethodDescriptionprotected voidTestMethodTestDescriptor.prepareExtensionContext(ExtensionContext extensionContext) protected voidTestTemplateInvocationTestDescriptor.prepareExtensionContext(ExtensionContext extensionContext) -
Uses of ExtensionContext in org.junit.jupiter.engine.execution
Methods in org.junit.jupiter.engine.execution that return ExtensionContextModifier and TypeMethodDescriptionExtensionContextSupplier.get(TestInstantiationAwareExtension extension) ExtensionContextSupplier.ScopeBasedExtensionContextSupplier.get(TestInstantiationAwareExtension extension) JupiterEngineExecutionContext.getExtensionContext()Methods in org.junit.jupiter.engine.execution with parameters of type ExtensionContextModifier and TypeMethodDescriptionInterceptingExecutableInvoker.ReflectiveInterceptorCall.apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<E> invocationContext, ExtensionContext extensionContext) voidInterceptingExecutableInvoker.ReflectiveInterceptorCall.VoidMethodInterceptorCall.apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) static ExtensionContextSupplierExtensionContextSupplier.create(ExtensionContext currentExtensionContext, ExtensionContext legacyExtensionContext, JupiterConfiguration configuration) ConditionEvaluator.evaluate(ExtensionRegistry extensionRegistry, JupiterConfiguration configuration, ExtensionContext context) Evaluate allExecutionConditionextensions registered for the suppliedExtensionContext.InterceptingExecutableInvoker.invoke(Method method, @Nullable Object target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, InterceptingExecutableInvoker.ReflectiveInterceptorCall<Method, T> interceptorCall) Invoke the supplied method with dynamic parameter resolution.voidAfterEachMethodAdapter.invokeAfterEachMethod(ExtensionContext context, ExtensionRegistry registry) voidBeforeEachMethodAdapter.invokeBeforeEachMethod(ExtensionContext context, ExtensionRegistry registry) voidInterceptingExecutableInvoker.invokeVoid(Method method, @Nullable Object target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, InterceptingExecutableInvoker.ReflectiveInterceptorCall.VoidMethodInterceptorCall interceptorCall) ParameterResolutionUtils.resolveParameters(Executable executable, Optional<Object> target, Optional<Object> outerInstance, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry) Resolve the array of parameters for the supplied executable, target, and outer instance.ParameterResolutionUtils.resolveParameters(Method method, Optional<Object> target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry) Resolve the array of parameters for the supplied method and target.JupiterEngineExecutionContext.Builder.withExtensionContext(ExtensionContext extensionContext) Constructors in org.junit.jupiter.engine.execution with parameters of type ExtensionContextModifierConstructorDescriptionDefaultExecutableInvoker(ExtensionContext extensionContext, ExtensionRegistry extensionRegistry) -
Uses of ExtensionContext in org.junit.jupiter.engine.extension
Subinterfaces of ExtensionContext in org.junit.jupiter.engine.extensionModifier and TypeInterfaceDescriptioninterfaceExtensionContextInternalextends theExtensionContextwith internal API. -
Uses of ExtensionContext in org.junit.jupiter.migrationsupport.conditions
Methods in org.junit.jupiter.migrationsupport.conditions with parameters of type ExtensionContextModifier and TypeMethodDescriptionIgnoreCondition.evaluateExecutionCondition(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.Containers/tests are disabled if@Ignoreis present on the test class or method. -
Uses of ExtensionContext in org.junit.jupiter.migrationsupport.rules
Methods in org.junit.jupiter.migrationsupport.rules with parameters of type ExtensionContextModifier and TypeMethodDescriptionvoidExpectedExceptionSupport.afterEach(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.voidExternalResourceSupport.afterEach(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.voidVerifierSupport.afterEach(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.voidExternalResourceSupport.beforeEach(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.voidExpectedExceptionSupport.handleTestExecutionException(ExtensionContext context, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ExtensionContext in org.junit.jupiter.params
Methods in org.junit.jupiter.params with parameters of type ExtensionContextModifier and TypeMethodDescriptionstatic @Nullable ParameterInfoParameterInfo.get(ExtensionContext context) Returns the closestParameterInfoinstance for the suppliedExtensionContext; potentiallynull. -
Uses of ExtensionContext in org.junit.jupiter.params.provider
Methods in org.junit.jupiter.params.provider with parameters of type ExtensionContextModifier and TypeMethodDescriptionAnnotationBasedArgumentsProvider.provideArguments(ExtensionContext context, A annotation) Deprecated.AnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations parameters, ExtensionContext context) AnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations parameters, ExtensionContext context, A annotation) The returnedStreamwill beproperly closedby the default implementation ofAnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations, ExtensionContext), making it safe to use a resource such asFiles.lines().ArgumentsProvider.provideArguments(ExtensionContext context) Deprecated.Please implementArgumentsProvider.provideArguments(ParameterDeclarations, ExtensionContext)instead.ArgumentsProvider.provideArguments(ParameterDeclarations parameters, ExtensionContext context) -
Uses of ExtensionContext in org.junit.jupiter.params.support
Methods in org.junit.jupiter.params.support with parameters of type ExtensionContextModifier and TypeMethodDescriptionstatic @Nullable ParameterInfoParameterInfo.get(ExtensionContext context) Deprecated, for removal: This API element is subject to removal in a future version.Please useParameterInfo.get(ExtensionContext)instead
AnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations, ExtensionContext, Annotation)instead.