-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
In Junit, extensions can throw org.opentest4j.TestAbortedException
which will abort any subsequent setup steps while afterEach will still run.
When MockitoExtension is declared after a beforeEach extension that skips, mockito's beforeEach will not be executed but it's afterEach will causing an exception:
java.lang.NullPointerException: Cannot invoke "java.util.Set.forEach(java.util.function.Consumer)" because the return value of "org.junit.jupiter.api.extension.ExtensionContext$Store.remove(Object, java.lang.Class)" is null
at org.mockito.junit.jupiter.MockitoExtension.afterEach(MockitoExtension.java:194)
...
Metadata
Metadata
Assignees
Labels
No labels