On Thu, Feb 17, 2011 at 9:48 AM, Gary <[email protected]> wrote:
>>>> // arrange
>>>> var s = MockRepository.GenerateMock<O>();
>>>> s.Expect(x => x.m(1,2)).Return(foo);
>
> Hmm. Now I'm in a situation where I can actually try this out, what does
> 'x' mean, here? This is some corner of C# I haven't looked at yet, just
> being able to randomly use some symbol without declaring it first?
>
> I mean, yeah, it works. Just looks a bit odd to me.

It's a lambda expression.  Makes the arrange/act/assert (AAA) syntax
very easy to write.  See this post I did a few years ago on lambdas:

http://weblogs.asp.net/psteele/archive/2008/12/15/loops-conversions-and-lambdas.aspx

---
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.

Reply via email to