phockito
phockito copied to clipboard
Support basic verification modes
I've added some basic verification mode functionality, to allow matching exact, max and min number of calls.
I haven't implemented only()
or noMoreInteractions()
, as they require a bit more effort (and, I suspect, aren't as frequently used). I also haven't done calls()
, since that's to do with ordered verification, which I haven't tackled here either.
I think it's all fairly straightforward, but let me know if you have any questions or if there's anything you'd like me to change.
Thanks, Rowan
I've got a bit more stuck into it and implemented noMoreInteractions, too. I'll probably look at implementing only() too when I get some more free time.
Note that the changes in the noMoreInteractions are a fair bit larger, but much of it is just refactoring, and pulling behaviour into typed objects, so it's not as big as it first looks!
Thanks, Rowan
Okay, I've added only(). I've also modified the noMoreInteractions() commit slightly, and added some tests around verification failure messages