I get the following error on this line:
session.Expect(s => s.Add("string", null)).IgnoreArguments().Return(SaveMockUser());
cannot convert from 'void' to 'Rhino.Mocks.RhinoMocksExtensions.VoidType'
SaveMockUser is defined as follows
private void SaveMockUser()
{
}
What am I doing wrong?
It’s not possible to return a void type. Probably what you want to do is have another expectation that expects that SaveMockUser() is actually called or actually perform the action via a callback – i.e., when you see this function called, then do this.
or even better – use the new inline constraints