I usually recommend the resources pointed to here
http://jonkruger.com/blog/2010/03/12/how-to-use-rhino-mocks-documented-through-tests/

Steve Bohlen
[email protected]
http://blog.unhandled-exceptions.com
http://twitter.com/sbohlen


On Fri, Nov 4, 2011 at 9:14 AM, Hagai Cohen <[email protected]> wrote:

> does anyone know where can I found a tutorial for Rhino that explain all
> the features and the methods ?
>
> thanks
> hagai
>
>
> 2011/11/4 Patrick Steele <[email protected]>
>
>> var foo = MockRepository.GenerateStub<IFoo>();
>> foo.Stub(f =>
>> f.MyMethod(null)).IgnoreArguments().Return(null).WhenCalled(o
>> => o.ReturnValue = o.Arguments[0]);
>>
>> Notice that you have to use the Return() method to set up a return
>> value even though it's going to be overwritten via the WhenCalled.
>> Since the method has a return type defined, Rhino.Mocks requires a
>> "Return" clause.
>>
>> ---
>> Patrick Steele
>> http://weblogs.asp.net/psteele
>>
>>
>>
>> On Sun, Oct 30, 2011 at 8:42 AM, hagai cohen <[email protected]>
>> wrote:
>> > hi
>> >
>> > I have a the following method: string MyMethod(string input);
>> > I would like to stub MyMethod that it will return the input parameter.
>> > For example: for "ABC" the stub method will return "ABC"
>> >
>> > how do I do that?
>> >
>> > --
>> > 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.
>>
>>  --
> 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.

Reply via email to