Uses of Interface
org.junit.jupiter.api.extension.ExtensionContext
-
Packages that use ExtensionContext Package Description org.junit.jupiter.api.extension JUnit Jupiter API for writing extensions.org.junit.jupiter.api.extension.support JUnit Jupiter API support for writing extensions.org.junit.jupiter.engine.descriptor Test descriptors used within the JUnit Jupiter test engine.org.junit.jupiter.engine.execution Internal classes for test execution within the JUnit Jupiter test engine.org.junit.jupiter.migrationsupport.conditions Extensions which provide support for conditional test execution features of JUnit 4 (e.g., the@Ignore
annotation) within JUnit Jupiter.org.junit.jupiter.migrationsupport.rules Extensions which provide (limited) support for JUnit 4 rules within JUnit Jupiter.org.junit.jupiter.params.provider ArgumentsProvider
implementations and their correspondingArgumentsSource
annotations. -
-
Uses of ExtensionContext in org.junit.jupiter.api.extension
Methods in org.junit.jupiter.api.extension that return ExtensionContext Modifier and Type Method Description ExtensionContext
ExtensionContext. getRoot()
Get the rootExtensionContext
.Methods in org.junit.jupiter.api.extension that return types with arguments of type ExtensionContext Modifier and Type Method Description Optional<ExtensionContext>
ExtensionContext. getParent()
Get the parent extension context, if available.Methods in org.junit.jupiter.api.extension with parameters of type ExtensionContext Modifier and Type Method Description void
AfterAllCallback. afterAll(ExtensionContext context)
Callback that is invoked once after all tests in the current container.void
AfterEachCallback. afterEach(ExtensionContext context)
Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.void
AfterTestExecutionCallback. 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.void
BeforeAllCallback. beforeAll(ExtensionContext context)
Callback that is invoked once before all tests in the current container.void
BeforeEachCallback. beforeEach(ExtensionContext context)
Callback that is invoked before an individual test and any user-defined setup methods for that test have been executed.void
BeforeTestExecutionCallback. 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.Object
TestInstanceFactory. createTestInstance(TestInstanceFactoryContext factoryContext, ExtensionContext extensionContext)
Callback for creating a test instance for the supplied context.ConditionEvaluationResult
ExecutionCondition. evaluateExecutionCondition(ExtensionContext context)
Evaluate this condition for the suppliedExtensionContext
.default void
LifecycleMethodExecutionExceptionHandler. handleAfterAllMethodExecutionException(ExtensionContext context, Throwable throwable)
Handle the suppliedThrowable
that was thrown during execution of a@AfterAll
lifecycle method.default void
LifecycleMethodExecutionExceptionHandler. handleAfterEachMethodExecutionException(ExtensionContext context, Throwable throwable)
Handle the suppliedThrowable
that was thrown during execution of a@AfterEach
lifecycle method.default void
LifecycleMethodExecutionExceptionHandler. handleBeforeAllMethodExecutionException(ExtensionContext context, Throwable throwable)
Handle the suppliedThrowable
that was thrown during execution of a@BeforeAll
lifecycle method.default void
LifecycleMethodExecutionExceptionHandler. handleBeforeEachMethodExecutionException(ExtensionContext context, Throwable throwable)
Handle the suppliedThrowable
that was thrown during execution of a@BeforeEach
lifecycle method.void
TestExecutionExceptionHandler. handleTestExecutionException(ExtensionContext context, Throwable throwable)
Handle the suppliedthrowable
.default void
InvocationInterceptor. interceptAfterAllMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of an@AfterAll
method.default void
InvocationInterceptor. interceptAfterEachMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of an@AfterEach
method.default void
InvocationInterceptor. interceptBeforeAllMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a@BeforeAll
method.default void
InvocationInterceptor. interceptBeforeEachMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a@BeforeEach
method.default void
InvocationInterceptor. interceptDynamicTest(InvocationInterceptor.Invocation<Void> invocation, ExtensionContext extensionContext)
Intercept the invocation of aDynamicTest
.default <T> T
InvocationInterceptor. interceptTestClassConstructor(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<Constructor<T>> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a test class constructor.default <T> T
InvocationInterceptor. interceptTestFactoryMethod(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a@TestFactory
method.default void
InvocationInterceptor. interceptTestMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a@Test
method.default void
InvocationInterceptor. interceptTestTemplateMethod(InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
Intercept the invocation of a@TestTemplate
method.void
TestInstancePostProcessor. postProcessTestInstance(Object testInstance, ExtensionContext context)
Callback for post-processing the supplied test instance.void
TestInstancePreDestroyCallback. preDestroyTestInstance(ExtensionContext context)
Callback for processing a test instance before it is destroyed.Stream<TestTemplateInvocationContext>
TestTemplateInvocationContextProvider. provideTestTemplateInvocationContexts(ExtensionContext context)
Provide invocation contexts for the test template method represented by the suppliedcontext
.Object
ParameterResolver. resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
Resolve an argument for theParameter
in the suppliedParameterContext
for the suppliedExtensionContext
.boolean
ParameterResolver. supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
Determine if this resolver supports resolution of an argument for theParameter
in the suppliedParameterContext
for the suppliedExtensionContext
.boolean
TestTemplateInvocationContextProvider. supportsTestTemplate(ExtensionContext context)
Determine if this provider supports providing invocation contexts for the test template method represented by the suppliedcontext
.default void
TestWatcher. testAborted(ExtensionContext context, Throwable cause)
Invoked after a test has been aborted.default void
TestWatcher. testDisabled(ExtensionContext context, Optional<String> reason)
Invoked after a disabled test has been skipped.default void
TestWatcher. testFailed(ExtensionContext context, Throwable cause)
Invoked after a test has failed.default void
TestWatcher. 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 ExtensionContext Modifier and Type Method Description abstract T
TypeBasedParameterResolver. resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
boolean
TypeBasedParameterResolver. supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
-
Uses of ExtensionContext in org.junit.jupiter.engine.descriptor
Methods in org.junit.jupiter.engine.descriptor with parameters of type ExtensionContext Modifier and Type Method Description protected TestInstances
ClassBasedTestDescriptor. instantiateTestClass(Optional<TestInstances> outerInstances, ExtensionRegistry registry, ExtensionContext extensionContext)
protected abstract TestInstances
ClassBasedTestDescriptor. instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionRegistrar registrar, ExtensionContext extensionContext, ThrowableCollector throwableCollector)
protected TestInstances
ClassTestDescriptor. instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionRegistrar registrar, ExtensionContext extensionContext, ThrowableCollector throwableCollector)
protected TestInstances
NestedClassTestDescriptor. instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionRegistrar registrar, ExtensionContext extensionContext, ThrowableCollector throwableCollector)
-
Uses of ExtensionContext in org.junit.jupiter.engine.execution
Methods in org.junit.jupiter.engine.execution that return ExtensionContext Modifier and Type Method Description ExtensionContext
JupiterEngineExecutionContext. getExtensionContext()
Methods in org.junit.jupiter.engine.execution with parameters of type ExtensionContext Modifier and Type Method Description T
ExecutableInvoker.ReflectiveInterceptorCall. apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<E> invocationContext, ExtensionContext extensionContext)
void
ExecutableInvoker.ReflectiveInterceptorCall.VoidMethodInterceptorCall. apply(InvocationInterceptor interceptor, InvocationInterceptor.Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)
ConditionEvaluationResult
ConditionEvaluator. evaluate(ExtensionRegistry extensionRegistry, JupiterConfiguration configuration, ExtensionContext context)
Evaluate allExecutionCondition
extensions registered for the suppliedExtensionContext
.<T> T
ExecutableInvoker. invoke(Constructor<T> constructor, Optional<Object> outerInstance, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, ExecutableInvoker.ReflectiveInterceptorCall<Constructor<T>,T> interceptorCall)
Invoke the supplied constructor with the supplied outer instance and dynamic parameter resolution.<T> T
ExecutableInvoker. invoke(Method method, Object target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry, ExecutableInvoker.ReflectiveInterceptorCall<Method,T> interceptorCall)
Invoke the suppliedstatic
method with dynamic parameter resolution.void
AfterEachMethodAdapter. invokeAfterEachMethod(ExtensionContext context, ExtensionRegistry registry)
void
BeforeEachMethodAdapter. invokeBeforeEachMethod(ExtensionContext context, ExtensionRegistry registry)
JupiterEngineExecutionContext.Builder
JupiterEngineExecutionContext.Builder. withExtensionContext(ExtensionContext extensionContext)
-
Uses of ExtensionContext in org.junit.jupiter.migrationsupport.conditions
Methods in org.junit.jupiter.migrationsupport.conditions with parameters of type ExtensionContext Modifier and Type Method Description ConditionEvaluationResult
IgnoreCondition. evaluateExecutionCondition(ExtensionContext context)
Containers/tests are disabled if@Ignore
is 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 ExtensionContext Modifier and Type Method Description void
ExpectedExceptionSupport. afterEach(ExtensionContext context)
void
ExternalResourceSupport. afterEach(ExtensionContext context)
void
VerifierSupport. afterEach(ExtensionContext context)
void
ExternalResourceSupport. beforeEach(ExtensionContext context)
void
ExpectedExceptionSupport. handleTestExecutionException(ExtensionContext context, Throwable throwable)
-
Uses of ExtensionContext in org.junit.jupiter.params.provider
Methods in org.junit.jupiter.params.provider with parameters of type ExtensionContext Modifier and Type Method Description Stream<? extends Arguments>
ArgumentsProvider. provideArguments(ExtensionContext context)
-