You'll be lucky ;)
http://ayende.com/Wiki/Rhino+Mocks+3.5.ashx has a hint at this, but doesn't
really explain that you need the Return("blah") to satisfy the compiler
public void Can_modify_return_value()
{
var stub = MockRepository.GenerateStub();
stub.Stub(x => x.StringArgString(Arg.Is("")))
.Return("blah")
.WhenCalled(invocation => invocation.ReturnValue = "arg");
Assert.AreEqual("arg", stub.StringArgString(""));
}
On 16 May 2011 14:52, Giulio Petrucci <[email protected]> wrote:
> Hi Alex,
>
> On Mon, May 16, 2011 at 3:47 PM, Alex McMahon <[email protected]> wrote:
> > you can add a .Return(null) and the WhenCalled will override this Return
> and
> > satisfy the error check.
>
> Thanks a lot! I'm going to try right now. :-)
> BTW: I couldn't find any documentation about that. Could you link me
> anything?
>
> Thanks,
> Giulio
>
> --
>
> --
> 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.