Did you change from mock.CreateMock<IUser> to mock.DynamicMock<IUser>?

On Thu, Oct 22, 2009 at 9:22 AM, hitechnical <[email protected]> wrote:

>
> Ok, I replaced Expect.On to SetupResult.For method and it worked fine.
> Now, I am doing this --
>
>            SetupResult.For(userToTest.UserName).Return(new
> System.Random(10).Next().ToString()).Repeat.Times(5);
>            SetupResult.For(userToTest.Password).Return("Password");
>
> My expectation is to get 5 different random numbers each time I call
> validationService.IsValidUser method
>
>            for(int i =1;i<=5;i++)
>                validationService.IsValidUser(userToTest);
>
> Am I doing something silly?
> >
>


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