The above test uses prefetches but i dont need a constraint. Wierd.
Any ideas?

On Dec 8, 12:10 pm, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> Probably because the method that isn't using the prefetch is using the
> parameters value equality to fix things.While the prefetch doesn't override
> Equals, so we are forced to compare using references, which are obviously
> not the same
>
>
>
> On Sun, Dec 7, 2008 at 10:05 PM, Blair <[EMAIL PROTECTED]> wrote:
>
> > It just seems a little strange as if I use another method without the
> > prefetch path parameter I do not need the constrainsts. Let me digg up
> > the test case and show you what I mean. Be right back.
> > Thanks for you assistance so far.
>
> > On Dec 8, 11:58 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> > > Oh my, that was a slip.I meant, you are telling Rhino Mocks to expect a
> > call
> > > with that particular parameters and to not consider anything else to
> > match
> > > this expectation
>
> > > On Sun, Dec 7, 2008 at 9:56 PM, Blair <[EMAIL PROTECTED]>
> > wrote:
>
> > > > Actually im using LLBLGen. I dont get what mean.
>
> > > > On Dec 8, 11:55 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> > > > > That is because without the constraints, you are telling NH that you
> > want
> > > > to
> > > > > look for a call with that particular ID and that particual feth path
>
> > > > > On Sun, Dec 7, 2008 at 9:46 PM, Blair <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > Hi Guys,
> > > > > >                  I am a huge fan of rhino mocks but I have a
> > question
> > > > > > regarding constraints.
>
> > > > > > Below is a code snippit of setting an expectation
> > > > > >           Expect.Call(facilityService.FindByIdentity(id,
> > > > > > prefetchPath))
> > > > > >               .Return(entity)
> > > > > >               .Constraints(Is.TypeOf(typeof(Guid)),
> > Is.TypeOf(typeof
> > > > > > (IPrefetchPath2)));
>
> > > > > > If I take the constraints out it doesnt work but when I add them
> > > > > > everything is okay. the facilityService is create using the Strict
> > > > > > mock call.
>
> > > > > > The ususual thing is on some unit tests I need to add constraints
> > like
> > > > > > this and other times I don't so it is a little inconsistent.
>
> > > > > > Can you explain why I need to do this and wether this is a problem
> > > > > > with the tool or just me missing something and using it
> > > > > > incorrectly. :)
>
> > > > > > Kind Regards,
>
> > > > > > Blair Davidson- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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