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

ArgumentCaptor and ArgumentMatchers can now mixed in varargs #613

Closed

Conversation

ChristianSchwarz
Copy link
Contributor

fixes #439

  • ArgumentCaptor and ArgumentMatchers can now mixed in varargs
  • added 25 regression tests in VarargsTest (5 are ignored cause they belong to other issues and fail currently)
  • refactored InvocationMatcher:
    • removed duplicates and unneccesary code
    • simplified the logic as much as possible
    • moved caputing logic to InvocationArgumentCaptor (if you have a better name let me know)

@TimvdLippe TimvdLippe added this to the 2.2 milestone Aug 29, 2016
@codecov-io
Copy link

codecov-io commented Aug 29, 2016

Current coverage is 88.23% (diff: 93.93%)

Merging #613 into master will decrease coverage by <.01%

@@             master       #613   diff @@
==========================================
  Files           266        267     +1   
  Lines          5161       5175    +14   
  Methods           0          0          
  Messages          0          0          
  Branches        847        848     +1   
==========================================
+ Hits           4554       4566    +12   
- Misses          429        431     +2   
  Partials        178        178          

Sunburst

Powered by Codecov. Last update b669b4f...88b6574

@mockitoguy
Copy link
Member

Great PR:

  • it neatly describes the high level design - I don't need to look into the code to find out the design
  • at adds tangible value to Mockito, making the library more intuitive to use. Library such as Mockito becomes great when we apply consistent effort over time and improve it one step at the time :D
  • it's not a refactoring-only PR :))))

Thanks!!! Keep it coming!

* @author Christian Schwarz
*
*/
public class InvocationArgumentCaptor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove empty comment ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@bric3
Copy link
Contributor

bric3 commented Aug 30, 2016

For me this code is really nice, this is definitely an improvement !
I would like however to see a unit test on InvocationArgumentCaptor this way it is easier to measure coverage overthere.

@bric3
Copy link
Contributor

bric3 commented Aug 30, 2016

I will wait for the release of mockito 2.1 though before merging this one. (As you may be aware we are skipping the number 2.0 in favor of 2.1 due to semantic versioning issues we had)

@ChristianSchwarz
Copy link
Contributor Author

@szczepiq
@bric3
Thanks for the great feedback! I am going to incorporate the requested changes during the coming week end.

@bric3 bric3 changed the title fixes #439 ArgumentCaptor and ArgumentMatchers can now mixed in varargs ArgumentCaptor and ArgumentMatchers can now mixed in varargs Sep 1, 2016
@bric3 bric3 added the on hold label Sep 6, 2016
@ChristianSchwarz
Copy link
Contributor Author

I close this PR it is superseded by #635.

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

5 participants