Hi all,
I have tried looking for a solution before posting so forgive me if
this is duplicate.
I am trying to mock a class and expect a method call on the
constructor however I get ....
"Test method
BaynoteControlTests.RecommendationStateTests.StateConstructor threw
exception:
System.InvalidOperationException: 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)."
Here is my test code ...
[TestMethod]
public void StateConstructor()
{
MockRepository mocks = new MockRepository();
PageStateWrapper mockState =
mocks.StrictMock<PageStateWrapper>();
Expect.Call(mockState.PageState()).Return(0);
RecommendationState recState = new
RecommendationState(mockState);
mocks.VerifyAll();
}
--
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.