You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer the following questions for yourself before submitting an issue.
I am running the latest version
I checked the documentation and found no answer
I checked to make sure that this issue has not already been filed
Expected Behavior
The provided JUnit 4 rule /. JUnit 5 extension efficiently run before/after test functions and classes.
Current Behavior
The provided JUnit 4 rule / JUnits 5 extension unmock after every test.
Context
In general, mocking can be expensive. Do not unmock unless the test class is completely done. Prefer clearing mocks instead of unmocking between test class functions.
The suggestion is to do the following for both the JUnit 4 rule and the JUnit 5 extension:
Before tests, init annotations
After every test function, clear all mocks.
After all test functions (after a test class), unmock all mocks.