Package io.micronaut.test.context
Interface TestMethodInterceptor<R>
- Type Parameters:
R
- The result type
- All Known Implementing Classes:
AbstractMicronautExtension
,MicronautJunit5Extension
,MicronautSpockExtension
public interface TestMethodInterceptor<R>
Test method interceptor. Intended to be used for API that doesn't support before/after phases.
- Since:
- 3.4.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptiondefault R
interceptAfterEach
(TestMethodInvocationContext<R> methodInvocationContext) Intercepts after each test invocation.default R
interceptBeforeEach
(TestMethodInvocationContext<R> methodInvocationContext) Intercepts before each test invocation.default R
interceptTest
(TestMethodInvocationContext<R> methodInvocationContext) Intercepts each test invocation.
-
Method Details
-
interceptBeforeEach
default R interceptBeforeEach(TestMethodInvocationContext<R> methodInvocationContext) throws Throwable Intercepts before each test invocation. -
interceptTest
Intercepts each test invocation. -
interceptAfterEach
default R interceptAfterEach(TestMethodInvocationContext<R> methodInvocationContext) throws Throwable Intercepts after each test invocation.
-