Is there any way to setup RhinoMocks expectation without caring about return value? Something like that:
repository.Expect(r => r.Add(1)).Return(Anything)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note that if you don’t specify a return value the default will be returned. So null for objects, false for bool, 0 for int, etc.
So in your case, if you are expecting one call to the method, you could write