Use "WhenCalled". myMock.Stub(x => x.SomeMethod()).WhenCalled(i => ...);
IIRC, the lambda parameter "i" is a "MethodInvocation" that gives you access to the method's arguments as well as setting a return value. --- Patrick Steele http://weblogs.asp.net/psteele On Wed, Sep 21, 2011 at 8:31 AM, Felix <[email protected]> wrote: > Hi, > > using Moq I would do this: > > myMock.Setup(x => x.MyMethod(It.IsAny<string>(), > It.IsAny<int>())).Returns( > (string str, int num) => > MyMethodLocalImplementation(str, num)); > > to implement one method of my stub locally. How can this be done in > Rhino? > > Thanks for any help. > felix > > -- > 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. > > -- 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.
