-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Regroup Junit classes in junit packages #748
Conversation
lower coverable due to the redirect classes (deprecated classes no extends the moved classes) |
Current coverage is 86.55% (diff: 70.00%)
|
Great PR!
I vote for a regroup into the junit package. We only have 3 classes here and I see no advantage of having an package with a single class. |
@bric3, please don't merge it. The new package you suggest is much better. Thing is, it is not really adding that much value to the users, while annoying them with deprecation warnings at the same time :) Let's keep runner where it is. It will die eventually with adoption of JUnit5. |
Also consider tons of various external documentation and examples referring to runners, that would be deprecated with this change. |
@szczepiq I'm not ready to merge it yet, however junit 4 will probably be there for a long time. @ChristianSchwarz Thanks ;) OK noted I had the same feeling after the push. |
4e4eff4
to
2743fc2
Compare
Very glad to hear you want to merge code eagerly :) I'm curious why you are so keen for this change? It introduces disturbance (deprecation of feature introduced 1 month ago, like Runner.Silent) while providing zero value to the user and negligible value to us? Even though the packages you suggest are much better, I still strongly believe that this should not be merged. |
For one it allows to regroup junit stuff in a single package that make sense. That is always something good, if we either want to ship a separate artefact for junit, public API will already make sense. On the same topic I don't want to drop Test-NG, I feel that we can either include it in mockito-core in a testng package. The disturbance is indeed true, but small, the types are the same, only the package changes. Note this has already happened on a new feature.
Yes they are much better. I will make the change for mockito 3, regardless of what happened in release/2.x, I'd rather prepare gently the user base on that, rather that enforce the change when 3.x is released. |
Since this change is non-breaking and makes sense for later refactorings (e.g. JUnit 5 compatible will likely be in a separate project), I am 👍 to this PR |
2743fc2
to
3d60ea4
Compare
Given the 3 👍 I'm gonna merge this pull request |
Signed-off-by: Brice Dutheil <brice.dutheil@gmail.com>
This change has been made in a way that is not breaking existing code. Signed-off-by: Brice Dutheil <brice.dutheil@gmail.com>
3d60ea4
to
312d7e3
Compare
Yes I recognise this was commending, sorry about that. Though I really feel this weighs in for a better public consistent API. Imho this his had to be done at some point. |
This PR proposes to regroup all JUnit related classes in corrct packages. There's two changes :
public : Deprecates
org.mockito.runners.MockitoJUnitRunner
and moves logic overorg.mockito.junit.runners.MockitoJUnitRunner
Questions :
junit.runner
or regroup the runner along with the rule in thejunit
package? (JUnit 5 will have neither of those)private : Moves JUnitHackerTool to
org.mockito.internal.junit.util