Can you please post the class under test?

On Feb 4, 2010, at 6:12 AM, BB <[email protected]> wrote:

The error in the exception is "Invalid call, the last call has been
used or no call has been made (make sure that you are calling a
virtual (C#) / Overridable (VB) method)."

Sample code
       [Test]
       public void TestEquals()
       {

           MockRepository mocks = new MockRepository();
           // example
           Object someObject = mocks.CreateMock<System.Object>();
           Object someParameter = mocks.CreateMock<System.Object>();
           //Exception occurs on the line below Expect.Call

Expect.Call<Object>(someObject.Equals(someParameter)).Return(false);
           mocks.ReplayAll();
           Assert.IsTrue(someObject.Equals(someParameter));
       }

-- You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en .


--
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to