mockito-scala icon indicating copy to clipboard operation
mockito-scala copied to clipboard

Add Sugar for argument capturing

Open borissmidt opened this issue 3 years ago • 2 comments

I've the feeling that explicitly typing the arguments you want to capture isn't very idiomatic for scala.

Here is my first try at explicitly typing the captureres. It is especially usefull if you want to verify if a call was done with a Seq where the order doesn't really matter.

There is still some work to be done but i don't want to implement up to 22 calls if it isn't going to be accepted anyway.

borissmidt avatar Mar 03 '21 11:03 borissmidt

I'm not really sure about this, I think you lose expressiveness on the test, but I'm not strictly against it either, so if you put together a PR with tests and the relevant entries on the Readme I'm not going to be against it, I'm open to having alternatives to achieve the same things, as it can be seen on the many options that both DSLs offer

ultrasecreth avatar Mar 05 '21 17:03 ultrasecreth

Oke, for me it is just about trying to avoid needless type annotations, if you have a better idea on how to achieve that let me know. I might need to finetune this one.

borissmidt avatar Mar 11 '21 09:03 borissmidt