Skip to content
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

Mockito#reset Condescending Documentation #3046

Closed
Blafasel3 opened this issue Jun 28, 2023 · 1 comment · Fixed by #3060
Closed

Mockito#reset Condescending Documentation #3046

Blafasel3 opened this issue Jun 28, 2023 · 1 comment · Fixed by #3060

Comments

@Blafasel3
Copy link

Hello,

I just realised that the method Mockito.reset() existed at all. The documentation in the most recent version states:

Smart Mockito users hardly use this feature because they know it could be a sign of poor tests.

At the core, I totally agree, this shouldn't be necessary. Nevertheless, the first sentence of the comment feels rather rude / condescending. I suggest a rephrase to something like

Using this method could be a sign of poor tests. <rest of the doc here>

Would help with that.

See the following link: https://github.com/mockito/mockito/blob/main/src/main/java/org/mockito/Mockito.java#L2581

@TimvdLippe
Copy link
Contributor

Yes that is certainly true. Do you mind sending us a PR to improve the wording?

thachlp added a commit to thachlp/mockito that referenced this issue Jul 13, 2023
@thachlp thachlp mentioned this issue Jul 13, 2023
8 tasks
TimvdLippe pushed a commit that referenced this issue Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants