Related to this post, in another test I would want to stub the cache object
and get it to return a particular value when the indexer is called, for
example:
string cachedObject = "<xml>";
var cache = MockRepository.GenerateStub<WebDataCache>();
cache.Stub(c =>
c["somedata"]).IgnoreArguments().Return(cachedObject);
This however throws an 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).
thanks....
Griff
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rhinomocks/-/JkN66kUUAaUJ.
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.