[
http://jira.codehaus.org/browse/JMOCK-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171276#action_171276 ]
Nat Pryce commented on JMOCK-220:
---------------------------------
It may be useful for jMock to have a 'anyOtherMethod' method-matcher. However, that can easily mask poor inter-object protocols by letting a test ignore lots of overly complex interactions. I'm not sure if such a feature would conflict with jMock's purpose as a design tool. Discussion on the mailing list is welcome...
> Using 'ignoring' an expectation overrides the expectation
> ---------------------------------------------------------
>
> Key: JMOCK-220
> URL:
http://jira.codehaus.org/browse/JMOCK-220> Project: jMock
> Issue Type: Bug
> Components: Library
> Affects Versions: 2.5.1
> Reporter: robert w. lawson
> Assignee: Nat Pryce
>
> I want to set an expectation that a particular method (or methods) on a mock are called, but ignore any other methods that are called on that mock. I've read some posts that say this is easily done by something like:
> oneOf (foo).doIt(45);
> ignoring (foo);
> However, this ignores all calls to the foo mock, including the doIt() method. The only thing I can do right now to get my test to work is to not use ignoring, and set an expectation on EVERY method of foo that is called. If I don't, when any method other than doIt() is called, an unexpected method invocation exception is thrown.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email