-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes #1003: Allow reloading of plugins. #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
- Makes the behavior of JUnit runner more consistent with JUnit rules. Lack of this consistency was reported by the users. - In Mockito 3.0 we will make the runner have exactly the same behavior as the rule and the implementation will be reused via MockitoTestListener implementations. Refactored JUnit runner implementation will make it easy. - The change should be safe. The most critical change is in SilentJUnitRunner - please review this class most carefully.
After some nice feedback from Brice!
Subjective decision. JUnit runner reporting stubbing mismatches is a nice feature!
JUnit runner reports argument stubbing mismatches
Fixes #838 : Adds a matches(Pattern)
It's already included in the interface hierarchy
'Impl' postfix in the interface name is very awkward
Also tweaked existing javadoc
This fixes recently introduced flakiness of the build.
For maintainability
Added missing Javadoc and few other tidy-ups
I'm tired of doing it manually from the Bintray web interface.
Automatically publish main jar to central
I'm tired of doing it manually from the Bintray web interface.
Support constructor parameters for spying on abstract classes Fixes #685
* Fixes #976: Improve constructor choosing With the current code (introduced in Mockito 2.7.14 by commit 6a82c03), calling MockSettings#useConstructor with an argument list that would be applicable to more than one constructor would fail with an org.mockito.internal.creation.instance.InstantiationException. This behavior, however, is suboptimal, as described in issue #976, as it makes useConstructor less robust than the Java compiler, which is able to resolve such ambiguities. With this patch, Mockito will attempt to match the constructor with the most specific parameter types. A constructor X is considered more specific than a constructor Y if: 1. They are both applicable to the given argument list 2. Constructor X has at least one parameter which is a further specialization of the corresponding parameter of constructor Y (i.e. paramX.isAssignableFrom(paramY)). 3. Constructor Y has no parameter which is a further specialization of the corresponding parameter of constructor X, as defined above. E.g., consider the following class: public class SomeClass { SomeClass(Object o) {} SomeClass(String s) {} } Without this patch, calling mock(SomeClass.class, withSettings().useConstructor("string!")) would fail. With this patch, such a call would invoke the SomeClass(String) constructor. * Fix Freudian slip in message regarding issue 685 The text should read "a better JOB", not "a better JOIN".
fix the broken link on 1357 line in Mockito.java [ci skip-release]
GitHub doesn't seem to render images from URLs with spaces properly, breaking the release notes badge. This change encodes the URL, replacing the space with %20 to make it render properly. [ci skip]
Fix release notes badge [ci skip-release]
Codecov Report
@@ Coverage Diff @@
## release/2.x #1004 +/- ##
=================================================
+ Coverage 86.86% 86.86% +<.01%
- Complexity 2290 2291 +1
=================================================
Files 287 287
Lines 5801 5803 +2
Branches 684 684
=================================================
+ Hits 5039 5041 +2
Misses 571 571
Partials 191 191
Continue to review full report at Codecov.
|
oops messed up a script destroyed my repo's git history. fixing it now. |
5 tasks
This was referenced Sep 9, 2017
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.
Fixes #1003: Allow reloading of plugins.
This is done by making the PluginRegistry non final and exposing a public static method in Plugins so that PluginSwitch's in the future can trigger a reload of plugins if it wants to disable/enable some of them.