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

Support basic verification modes #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rowanhill
Copy link
Contributor

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

@rowanhill
Copy link
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,
Rowan

- Track invocations as Phockito_Invocation
- Refactor (Phockito_)VerificationMode API to allow more flexible failure messaging
@rowanhill
Copy link
Contributor Author

Okay, I've added only(). I've also modified the noMoreInteractions() commit slightly, and added some tests around verification failure messages

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.

1 participant