|
10 | 10 |
|
11 | 11 | package org.junit.jupiter.api.extension; |
12 | 12 |
|
| 13 | +import java.lang.reflect.Constructor; |
| 14 | +import java.lang.reflect.Method; |
13 | 15 | import java.util.Optional; |
14 | 16 | import java.util.stream.Stream; |
15 | 17 |
|
@@ -177,4 +179,67 @@ public void testAborted(ExtensionContext context, Throwable cause) { |
177 | 179 | public void testFailed(ExtensionContext context, Throwable cause) { |
178 | 180 | } |
179 | 181 |
|
| 182 | + // --- InvocationInterceptor ----------------------------------------------- |
| 183 | + |
| 184 | + @Override |
| 185 | + public <T> T interceptTestClassConstructor(Invocation<T> invocation, |
| 186 | + ReflectiveInvocationContext<Constructor<T>> invocationContext, ExtensionContext extensionContext) |
| 187 | + throws Throwable { |
| 188 | + return InvocationInterceptor.super.interceptTestClassConstructor(invocation, invocationContext, |
| 189 | + extensionContext); |
| 190 | + } |
| 191 | + |
| 192 | + @Override |
| 193 | + public void interceptBeforeAllMethod(Invocation<Void> invocation, |
| 194 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 195 | + InvocationInterceptor.super.interceptBeforeAllMethod(invocation, invocationContext, extensionContext); |
| 196 | + } |
| 197 | + |
| 198 | + @Override |
| 199 | + public void interceptBeforeEachMethod(Invocation<Void> invocation, |
| 200 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 201 | + InvocationInterceptor.super.interceptBeforeEachMethod(invocation, invocationContext, extensionContext); |
| 202 | + } |
| 203 | + |
| 204 | + @Override |
| 205 | + public void interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, |
| 206 | + ExtensionContext extensionContext) throws Throwable { |
| 207 | + InvocationInterceptor.super.interceptTestMethod(invocation, invocationContext, extensionContext); |
| 208 | + } |
| 209 | + |
| 210 | + @Override |
| 211 | + public <T> T interceptTestFactoryMethod(Invocation<T> invocation, |
| 212 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 213 | + return InvocationInterceptor.super.interceptTestFactoryMethod(invocation, invocationContext, extensionContext); |
| 214 | + } |
| 215 | + |
| 216 | + @Override |
| 217 | + public void interceptTestTemplateMethod(Invocation<Void> invocation, |
| 218 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 219 | + InvocationInterceptor.super.interceptTestTemplateMethod(invocation, invocationContext, extensionContext); |
| 220 | + } |
| 221 | + |
| 222 | + @SuppressWarnings("deprecation") |
| 223 | + @Override |
| 224 | + public void interceptDynamicTest(Invocation<Void> invocation, ExtensionContext extensionContext) throws Throwable { |
| 225 | + InvocationInterceptor.super.interceptDynamicTest(invocation, extensionContext); |
| 226 | + } |
| 227 | + |
| 228 | + @Override |
| 229 | + public void interceptDynamicTest(Invocation<Void> invocation, DynamicTestInvocationContext invocationContext, |
| 230 | + ExtensionContext extensionContext) throws Throwable { |
| 231 | + InvocationInterceptor.super.interceptDynamicTest(invocation, invocationContext, extensionContext); |
| 232 | + } |
| 233 | + |
| 234 | + @Override |
| 235 | + public void interceptAfterEachMethod(Invocation<Void> invocation, |
| 236 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 237 | + InvocationInterceptor.super.interceptAfterEachMethod(invocation, invocationContext, extensionContext); |
| 238 | + } |
| 239 | + |
| 240 | + @Override |
| 241 | + public void interceptAfterAllMethod(Invocation<Void> invocation, |
| 242 | + ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext) throws Throwable { |
| 243 | + InvocationInterceptor.super.interceptAfterAllMethod(invocation, invocationContext, extensionContext); |
| 244 | + } |
180 | 245 | } |
0 commit comments