Uses of Interface
org.junit.jupiter.api.extension.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.
|
-
Uses of ExtensionContext in org.junit.jupiter.api.extension
Methods in org.junit.jupiter.api.extension that return ExtensionContext Modifier and Type Method Description ExtensionContextExtensionContext. getRoot()Get the rootExtensionContext.Methods in org.junit.jupiter.api.extension that return types with arguments of type ExtensionContext Modifier and Type Method Description java.util.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 voidAfterAllCallback. afterAll(ExtensionContext context)Callback that is invoked once after all tests in the current container.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.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.java.lang.ObjectTestInstanceFactory. createTestInstance(TestInstanceFactoryContext factoryContext, ExtensionContext extensionContext)Callback for creating a test instance for the supplied context.ConditionEvaluationResultExecutionCondition. evaluateExecutionCondition(ExtensionContext context)Evaluate this condition for the suppliedExtensionContext.default voidLifecycleMethodExecutionExceptionHandler. handleAfterAllMethodExecutionException(ExtensionContext context, java.lang.Throwable throwable)Handle the suppliedThrowablethat was thrown during execution of a@AfterAlllifecycle method.default voidLifecycleMethodExecutionExceptionHandler. handleAfterEachMethodExecutionException(ExtensionContext context, java.lang.Throwable throwable)Handle the suppliedThrowablethat was thrown during execution of a@AfterEachlifecycle method.default voidLifecycleMethodExecutionExceptionHandler. handleBeforeAllMethodExecutionException(ExtensionContext context, java.lang.Throwable throwable)Handle the suppliedThrowablethat was thrown during execution of a@BeforeAlllifecycle method.default voidLifecycleMethodExecutionExceptionHandler. handleBeforeEachMethodExecutionException(ExtensionContext context, java.lang.Throwable throwable)Handle the suppliedThrowablethat was thrown during execution of a@BeforeEachlifecycle method.voidTestExecutionExceptionHandler. handleTestExecutionException(ExtensionContext context, java.lang.Throwable throwable)Handle the suppliedthrowable.default voidInvocationInterceptor. interceptAfterAllMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of an@AfterAllmethod.default voidInvocationInterceptor. interceptAfterEachMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of an@AfterEachmethod.default voidInvocationInterceptor. interceptBeforeAllMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a@BeforeAllmethod.default voidInvocationInterceptor. interceptBeforeEachMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a@BeforeEachmethod.default voidInvocationInterceptor. interceptDynamicTest(InvocationInterceptor.Invocation<java.lang.Void> invocation, DynamicTestInvocationContext invocationContext, ExtensionContext extensionContext)Intercept the invocation of aDynamicTest.default voidInvocationInterceptor. interceptDynamicTest(InvocationInterceptor.Invocation<java.lang.Void> invocation, ExtensionContext extensionContext)Deprecated.default <T> TInvocationInterceptor. interceptTestClassConstructor(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<java.lang.reflect.Constructor<T>> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a test class constructor.default <T> TInvocationInterceptor. interceptTestFactoryMethod(InvocationInterceptor.Invocation<T> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a@TestFactorymethod, such as a@RepeatedTestor@ParameterizedTestmethod.default voidInvocationInterceptor. interceptTestMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a@Testmethod.default voidInvocationInterceptor. interceptTestTemplateMethod(InvocationInterceptor.Invocation<java.lang.Void> invocation, ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, ExtensionContext extensionContext)Intercept the invocation of a@TestTemplatemethod.voidTestInstancePostProcessor. postProcessTestInstance(java.lang.Object testInstance, ExtensionContext context)Callback for post-processing the supplied test instance.voidTestInstancePreDestroyCallback. preDestroyTestInstance(ExtensionContext context)Callback for processing test instances before they are destroyed.static voidTestInstancePreDestroyCallback. preDestroyTestInstances(ExtensionContext context, java.util.function.Consumer<java.lang.Object> callback)Utility method for processing all test instances of anExtensionContextthat are not present in any of its parent contexts.java.util.stream.Stream<TestTemplateInvocationContext>TestTemplateInvocationContextProvider. provideTestTemplateInvocationContexts(ExtensionContext context)Provide invocation contexts for the test template method represented by the suppliedcontext.java.lang.ObjectParameterResolver. resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)Resolve an argument for theParameterin the suppliedParameterContextfor the suppliedExtensionContext.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, java.lang.Throwable cause)Invoked after a test has been aborted.default voidTestWatcher. testDisabled(ExtensionContext context, java.util.Optional<java.lang.String> reason)Invoked after a disabled test has been skipped.default voidTestWatcher. testFailed(ExtensionContext context, java.lang.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 ExtensionContext Modifier and Type Method Description abstract TTypeBasedParameterResolver. resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)booleanTypeBasedParameterResolver. supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
InvocationInterceptor.interceptDynamicTest(Invocation, DynamicTestInvocationContext, ExtensionContext)instead