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

Best-effort error reporting for interactions on final methods #2040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndreasTu
Copy link
Member

Add error reporting code to the byte-buddy` mock maker to report interaction on final methods, which can't be handled.

The IMockInteractionValidation interface allows IMockMakers to implement different kinds of validations on mock interactions.

Fixes #2039

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.94%. Comparing base (2c7db77) to head (a50eb7f).
Report is 159 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/spockframework/mock/runtime/MockObject.java 76.92% 1 Missing and 2 partials ⚠️
...ck/runtime/ByteBuddyMockInteractionValidation.java 95.65% 1 Missing and 1 partial ⚠️
...ckframework/spring/mock/DelegatingInterceptor.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2040      +/-   ##
============================================
+ Coverage     80.44%   81.94%   +1.49%     
- Complexity     4337     4643     +306     
============================================
  Files           441      450       +9     
  Lines         13534    14509     +975     
  Branches       1707     1836     +129     
============================================
+ Hits          10888    11889    +1001     
+ Misses         2008     1943      -65     
- Partials        638      677      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add error reporting code to the byte-buddy` mock maker
to report interaction on final methods, which can't be handled.

The IMockInteractionValidation interface allows IMockMakers
to implement different kinds of validations on mock interactions.

Fixes spockframework#2039
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.

Stub creates Spy when a method is final
1 participant