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 #1382 Jupiter Captor annotation support #3133

Merged

Conversation

EugenLaz
Copy link
Contributor

@EugenLaz EugenLaz commented Oct 5, 2023

Checklist

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • 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
  • Avoid other runtime dependencies
  • 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
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

Fixes #1382.
Introducing new ParameterResolver for @captor annotation for MockitoExtension, allowing initialization of ArgumentCaptors with annotation.

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 work, thanks!

@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.51%. Comparing base (edc6243) to head (2ca624a).
Report is 164 commits behind head on main.

Files with missing lines Patch % Lines
...ernal/configuration/CaptorAnnotationProcessor.java 50.00% 2 Missing and 1 partial ⚠️
...va/org/mockito/junit/jupiter/MockitoExtension.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3133      +/-   ##
============================================
+ Coverage     85.48%   85.51%   +0.03%     
- Complexity     2892     2908      +16     
============================================
  Files           329      333       +4     
  Lines          8826     8852      +26     
  Branches       1095     1095              
============================================
+ Hits           7545     7570      +25     
  Misses          994      994              
- Partials        287      288       +1     

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

@TimvdLippe TimvdLippe merged commit 6f4eb02 into mockito:main Oct 6, 2023
12 of 13 checks passed
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.

Support @Captor injection in JUnit 5 method parameters
3 participants