Module org.junit.jupiter.api
Package org.junit.jupiter.api.extension
package org.junit.jupiter.api.extension
JUnit Jupiter API for writing extensions.
-
ClassDescription
AfterAllCallbackdefines the API forExtensionsthat wish to provide additional behavior to test containers once after all tests in the container have been executed.AfterEachCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests after an individual test and any user-defined teardown methods (e.g.,@AfterEachmethods) for that test have been executed.AfterTestExecutionCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests immediately after an individual test has been executed but before any user-defined teardown methods (e.g.,@AfterEachmethods) have been executed for that test.AnnotatedElementContextencapsulates the context in which anAnnotatedElementis declared.BeforeAllCallbackdefines the API forExtensionsthat wish to provide additional behavior to test containers once before all tests in the container have been executed.BeforeEachCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests before an individual test and any user-defined setup methods (e.g.,@BeforeEachmethods) for that test have been executed.BeforeTestExecutionCallbackdefines the API forExtensionsthat wish to provide additional behavior to tests immediately before an individual test is executed but after any user-defined setup methods (e.g.,@BeforeEachmethods) have been executed for that test.The result of evaluating anExecutionCondition.DynamicTestInvocationContextrepresents the context of a single invocation of a dynamic test.ExecutableInvokerallows invoking methods and constructors with support for dynamic resolution of parameters viaParameterResolvers.ExecutionConditiondefines theExtensionAPI for programmatic, conditional test execution.@ExtendWithis a repeatable annotation that is used to register extensions for the annotated test class, test interface, test method, parameter, or field.Marker interface for all extensions.Thrown if an error is encountered regarding the configuration of an extension.ExtensionContextencapsulates the context in which the current test or container is being executed.ANamespaceis used to provide a scope for data saved by extensions within aExtensionContext.Store.Storeprovides methods for extensions to save and retrieve data.Classes implementing this interface indicate that they want toExtensionContext.Store.CloseableResource.close()some underlying resource or resources when the enclosingStoreis closed.Thrown if an error is encountered regarding the use of anExtensionContextorExtensionContext.Store.@Extensionsis a container for one or more@ExtendWithdeclarations.InvocationInterceptordefines the API forExtensionsthat wish to intercept calls to test code.An invocation that returns a result and may throw aThrowable.LifecycleMethodExecutionExceptionHandlerdefines the API forExtensionsthat wish to handle exceptions thrown during the execution of@BeforeAll,@BeforeEach,@AfterEach, and@AfterAlllifecycle methods.ParameterContextencapsulates the context in which anExecutablewill be invoked for a givenParameter.Thrown if an error is encountered in the configuration or execution of aParameterResolver.ParameterResolverdefines the API forExtensionsthat wish to dynamically resolve arguments for parameters at runtime.ReflectiveInvocationContext<T extends Executable>ReflectiveInvocationContextencapsulates the context of a reflective invocation of an executable (method or constructor).@RegisterExtensionis used to register anExtensionvia a field in a test class.TestExecutionExceptionHandlerdefines the API forExtensionsthat wish to handle exceptions thrown during test execution.TestInstanceFactoryContextencapsulates the context in which a test class is to be instantiated by aTestInstanceFactory.TestInstancePostProcessordefines the API forExtensionsthat wish to post-process test instances.TestInstancePreConstructCallbackdefines the API forExtensionsthat wish to be invoked prior to creation of test instances.TestInstancePreDestroyCallbackdefines the API forExtensionsthat wish to process test instances after they have been used in tests but before they are destroyed.TestInstancesencapsulates the test instances of a test.Thrown if an error is encountered during the execution of aTestInstanceFactory.TestTemplateInvocationContextrepresents the context of a single invocation of a test template.TestTemplateInvocationContextProviderdefines the API forExtensionsthat wish to provide one or multiple contexts for the invocation of a@TestTemplatemethod.TestWatcherdefines the API forExtensionsthat wish to process test results.