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

Assertion matcher #2960

Closed
michaldo opened this issue Apr 2, 2023 · 1 comment
Closed

Assertion matcher #2960

michaldo opened this issue Apr 2, 2023 · 1 comment

Comments

@michaldo
Copy link

michaldo commented Apr 2, 2023

ArgumentMatcher returns true/false and it's enough for stubs.
However, for mocks false is not enough. When expectation is not meet, it is important why not meet. It means rich-failure is needed, not just false

Actually rich-failure can be achieved with org.assertj.core.matcher.AssertionMatcher.
It works but it's not handy: every assertion needs a class, when lambda is enough

michaldo added a commit to michaldo/mockito that referenced this issue Apr 2, 2023
@TimvdLippe
Copy link
Contributor

Duplicate of #2285

@TimvdLippe TimvdLippe marked this as a duplicate of #2285 Apr 9, 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