I believe this came up a long time ago...and the problem is that with
lambdas you have to supply *something* for each parameter of the called
method.

To that end...what you have is proper (as I recall).

Just to help allay your fears a bit...this verbosity isn't always a bad
thing.  When I read the code, based on the syntax you have used I know that
for this particular test no parameters matter except the first...extremely
useful in my opinion.

Tim

On Mon, May 17, 2010 at 3:00 AM, Dan Ryan <[email protected]>wrote:

> Hi,
>
> I am currently using the following code to verify a single parameter
> input to a method.  Is there a cleaner way to do this without needed
> to supply Is.Any for the parameters I am not interested in?
>
> [TestMethod]
>        public void ShouldCallTheAvanceServiceWithTheAValidGuid()
>        {
>            _sut.Send(_sampleInput);
>            _avanceInterface.AssertWasCalled(x => x.SendData(
>                Arg<Guid>.Is.Equal(Guid.Empty),
>                Arg<string>.Is.Anything,
>                Arg<string>.Is.Anything,
>                Arg<string>.Is.Anything,
>                Arg<string>.Is.Anything));
>        }
>
> Thanks in advance,
>
> Dan
>
> --
> 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]<rhinomocks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhinomocks?hl=en.
>
>


-- 
Tim Barcz
Microsoft C# MVP
Microsoft ASPInsider
http://timbarcz.devlicio.us
http://www.twitter.com/timbarcz

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