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

Fixes #2242 : Make exceptions for Inorder.verify more standard / spec… #2263

Merged
merged 2 commits into from Apr 12, 2021

Conversation

devintark
Copy link
Contributor

…ific

*Adds NullInsteadOfMockException and NotAMockException checks to Inorder.verify() before checking if mocks were passed in during creation of Inorder

See #2242 for a description of the issue.

Inorder.verify(mock) now first checks if the passed argument is null, and if the mock is in fact a mock, and gives appropriate Exception messages, before checking if the passed in argument was passed during creation of Inorder object, and therefore giving a less specific error message.

Checklist

  • [x ] Read the contributing guide
  • [ x] PR should be motivated, i.e. what does it fix, why, and if relevant how
  • [ x] If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • [x ] Avoid other runtime dependencies
  • [x ] Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • [x ] The pull request follows coding style
  • [ x] Mention Fixes #<issue number> in the description if relevant
  • [ x] At least one commit should mention Fixes #<issue number> if relevant

… / specific

*Adds NullInsteadOfMockException and NotAMockException checks to Inorder.verify() *before* checking if mocks were passed in during creation of Inorder
Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TimvdLippe TimvdLippe merged commit 2fa2a63 into mockito:release/3.x Apr 12, 2021
@mjustin
Copy link

mjustin commented Apr 12, 2021

Indeed, thanks!

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 this pull request may close these issues.

None yet

3 participants