Do not pass static mocks to regular listener callback.#1989
Merged
raphw merged 1 commit intorelease/3.xfrom Jul 29, 2020
Merged
Do not pass static mocks to regular listener callback.#1989raphw merged 1 commit intorelease/3.xfrom
raphw merged 1 commit intorelease/3.xfrom
Conversation
TimvdLippe
approved these changes
Jul 28, 2020
Codecov Report
@@ Coverage Diff @@
## release/3.x #1989 +/- ##
=================================================
- Coverage 85.28% 85.23% -0.05%
- Complexity 2601 2604 +3
=================================================
Files 322 323 +1
Lines 7510 7520 +10
Branches 898 899 +1
=================================================
+ Hits 6405 6410 +5
- Misses 869 873 +4
- Partials 236 237 +1
Continue to review full report at Codecov.
|
…istort existing mock collectors that do not expect scoped mocks. Fixes #1988.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does not include static mocks in regular listener logic as it might distort existing mock collectors that do not expect scoped mocks. Fixes #1988.
We have passed
Classobjects to the listener to indicate a static mock. The class object is of course itself not a regular mock and it's cleaner to create a callback method of it's own. This way, existing listeners remain logically backwards compatible, including our own listener that is used within the JUnit runner (we have only tested the rule, I added a test for the runner, too).