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: 4 lines in your changes are missing coverage. Please review.

Comparison is base (edc6243) 85.48% compared to head (2ca624a) 85.51%.
Report is 4 commits behind head on main.

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     
Files Coverage Δ
...ockito/internal/util/reflection/GenericMaster.java 100.00% <100.00%> (ø)
...unit/jupiter/resolver/CaptorParameterResolver.java 100.00% <100.00%> (ø)
...t/jupiter/resolver/CompositeParameterResolver.java 100.00% <100.00%> (ø)
.../junit/jupiter/resolver/MockParameterResolver.java 100.00% <100.00%> (ø)
...va/org/mockito/junit/jupiter/MockitoExtension.java 94.28% <87.50%> (-0.59%) ⬇️
...ernal/configuration/CaptorAnnotationProcessor.java 76.92% <50.00%> (-23.08%) ⬇️

... and 3 files with indirect coverage changes

☔ 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