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 #1712 : prepend description to AssertionError thrown in verification #1949

Merged
merged 2 commits into from Jun 20, 2020
Merged

Fixes #1712 : prepend description to AssertionError thrown in verification #1949

merged 2 commits into from Jun 20, 2020

Conversation

adrianriley
Copy link
Contributor

Extended MockitoAssertionError to wrap instance of AssertionError in addition to MockitoAssertionError, so that the various possible exceptions thrown for non-matching arguments have description prepended to the message.

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.

Nice fix, thanks!

@TimvdLippe
Copy link
Contributor

Oh, it seems like you need to run ./gradlew spotlessApply locally to fix the formatting issues.

@TimvdLippe
Copy link
Contributor

TimvdLippe commented Jun 20, 2020

I think you need to rebase on release/3.x to pick up the latest changes. Your Spotless configuration locally appears to be out-of-date.

@TimvdLippe
Copy link
Contributor

Are you running ./gradlew spotlessApply? I can take a look on Monday why it is not formatting as expected.

@adrianriley
Copy link
Contributor Author

Thanks Tim, I've rebased now, hopefully should fix the formatting issue. Just squashed the commits.

@codecov-commenter
Copy link

Codecov Report

Merging #1949 into release/3.x will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##             release/3.x    #1949      +/-   ##
=================================================
+ Coverage          85.76%   85.77%   +0.01%     
- Complexity          2542     2543       +1     
=================================================
  Files                318      318              
  Lines               7209     7215       +6     
  Branches             861      861              
=================================================
+ Hits                6183     6189       +6     
  Misses               810      810              
  Partials             216      216              
Impacted Files Coverage Δ Complexity Δ
...mockito/exceptions/base/MockitoAssertionError.java 100.00% <100.00%> (ø) 4.00 <1.00> (+1.00)
...org/mockito/internal/verification/Description.java 72.72% <100.00%> (+6.06%) 2.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 397b4d2...59478e0. Read the comment docs.

@TimvdLippe TimvdLippe merged commit 0ed81f7 into mockito:release/3.x Jun 20, 2020
@adrianriley adrianriley deleted the feature/#1712 branch June 20, 2020 16:56
epeee pushed a commit to epeee/mockito that referenced this pull request Jun 22, 2020
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