On Thu, Feb 17, 2011 at 3:06 AM, Gary <[email protected]> wrote: > So how can I do this using rhino? All I want to do is specify that when > O.m is called the second time (for example), it should expect certain > values (1 and 2, say), and return 'foo'.
This should do it. This example is easy with constants (1 and 2), but there are argument constraints that you can use to get pretty fancy on what your mocked/stubbed calls to accept: // arrange var s = MockRepository.GenerateMock<O>(); s.Expect(x => x.m(1,2)).Return(foo); // act // do stuff that uses "s" // assert s.VerifyExpectations(); --- Patrick Steele http://weblogs.asp.net/psteele -- 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.
