Support basic verification modes#30
Open
rowanhill wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
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, |
- Track invocations as Phockito_Invocation - Refactor (Phockito_)VerificationMode API to allow more flexible failure messaging
Contributor
Author
|
Okay, I've added only(). I've also modified the noMoreInteractions() commit slightly, and added some tests around verification failure messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added some basic verification mode functionality, to allow matching exact, max and min number of calls.
I haven't implemented
only()ornoMoreInteractions(), as they require a bit more effort (and, I suspect, aren't as frequently used). I also haven't donecalls(), 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