Closed quaff closed 8 months ago
I think it's necessary to enforce using BDDMockito
Thanks for the suggestion, @quaff. Why do you think it is necessary to enforce using BDDMockito?
FWIW I also find this mixed usage of BDD-style and traditional Mockito APIs to be rather confusing and unintuitive.
https://github.com/spring-projects/spring-boot/pull/29178#issuecomment-1002941378
I am not denying that harmonization is good, I was asking you why you think that BDDMockito should be enforced. I know what the Spring Boot team did as I am sure you are aware but that doesn't mean that all teams have the same preferences.
I was asking you why you think that BDDMockito should be enforced.
I also find this mixed usage of BDD-style and traditional Mockito APIs to be rather confusing and unintuitive.
but that doesn't mean that all teams have the same preferences.
Let's here from others of team.
We already have a few rules enforced with our checkstyle configuration. Even these rules can be cumbersome in my opinion, as if I'm not mistaken the BDD-style doesn't allow to mock methods returning void
and that doThrow
is "forbidden".
I'm all for consistency, but I think our current arrangement works and that enforcing new rules would create a lot of consistency work for not so much benefit. Improving our test coverage or working on the issue backlog are higher priorities for me right now.
I'm in favor of declining this proposal.
Mostly same feedback than Brian, and I am myself not fully convince yet we should use the BDD-style everywhere (more a matter of taste I guess).
There are lots of codes that mixing usage of BDD-style and traditional Mockito API, and keep increasing , I think it's necessary to enforce using BDDMockito, If the team decide to align with Spring Boot, I would like to submit an PR.