I'm playing around with Rhino Mocks and am trying to set some dummy results on my mocked objects so when they are called in my factory methods I don't have to worry about the data.
But I've hit a snag, the methods I want to have the dummy results for are causing exceptions because they aren't virtual.
I've got code like this:
using(mock.Record()){
SetupResult.For(service.SomeMethod()).Return("hello world");
}
Does the SomeMethod
method have to be a virtual to be have a mocked result?
Also, what's the difference between SetupResult.For
and Expect.Call
?