-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Enforce using BDDMockito #29178
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
Enforce using BDDMockito #29178
Conversation
608fe73 to
8e313d0
Compare
snicoll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR but I don't see a reason to change calls to verify.
|
Mixing spring-boot/src/checkstyle/checkstyle.xml Lines 49 to 55 in 47516b5
|
|
@quaff that's a team decision I am afraid and what you've quoted doesn't include
We've been there before and we have no intention to change calls to |
Does the team decide to keep weird |
|
@snicoll What @quaff is trying to say is that Please use BDD-style (given, when, then) using BDDMockito imports message on the Checkstyle rule is actually in conflict with what you describe as the team's preference - you don't actually use FWIW I also find this mixed usage of BDD-style and traditional Mockito APIs to be rather confusing and unintuitive. |
|
Thanks both. We've discussed this as a team and decided to harmonize and use |
1. Replace Mockito.verify*() with BDDMockito.then() 2. Replace Mockito.doReturn() with BDDMockito.willReturn() 3. Adjust checkstyle rule
1. Replace Mockito.verify*() with BDDMockito.then() 2. Replace Mockito.doReturn() with BDDMockito.willReturn() 3. Adjust checkstyle rule See gh-29178
Mockito.verify*()withBDDMockito.then()Mockito.doReturn()withBDDMockito.willReturn()