« Return to Thread: [jira] Created: (JMOCK-220) Using 'ignoring' an expectation overrides the expectation

[jira] Created: (JMOCK-220) Using 'ignoring' an expectation overrides the expectation

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread

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


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


 « Return to Thread: [jira] Created: (JMOCK-220) Using 'ignoring' an expectation overrides the expectation