Skip to content

Commit cd4bbfd

Browse files
author
Mateusz Pietryga
committed
Implement tests for LifecycleMethodExecutionExceptionHandler
1 parent 46211a8 commit cd4bbfd

File tree

2 files changed

+582
-0
lines changed

2 files changed

+582
-0
lines changed

junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/KitchenSinkExtension.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public class KitchenSinkExtension implements
4040
AfterEachCallback,
4141
AfterAllCallback,
4242

43+
// Lifecycle methods exception handling
44+
LifecycleMethodExecutionExceptionHandler,
45+
4346
// Dependency Injection
4447
TestInstanceFactory,
4548
TestInstancePostProcessor,
@@ -88,6 +91,29 @@ public void afterEach(ExtensionContext context) {
8891
public void afterAll(ExtensionContext context) {
8992
}
9093

94+
// --- Lifecycle methods exception handling
95+
96+
@Override
97+
public void handleBeforeAllMethodExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
98+
99+
}
100+
101+
@Override
102+
public void handleBeforeEachMethodExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
103+
104+
}
105+
106+
@Override
107+
public void handleAfterEachMethodExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
108+
109+
}
110+
111+
@Override
112+
public void handleAfterAllMethodExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
113+
114+
}
115+
116+
91117
// --- Dependency Injection ------------------------------------------------
92118

93119
@Override

0 commit comments

Comments
 (0)