Please post the failing code/test (that always helps).

Tim

On Sun, Oct 4, 2009 at 6:03 PM, Scott White <[email protected]> wrote:

>
> I was migrating some of my R&P methods into stubs but one of them I
> could not convert over.  This I think is because the return value is a
> class with all virtual properties and Rhino Mocks seems to be proxying
> it and not returning the values that I set.
>
> dao.Stub(x => x.FindByUser(user.GetType(), user.Username)).Return
> (user); // dao.Expect has same behavior
>
> later in my test:
>
> service.Authenticate(..)
>
> This service calls the dao and takes the user object and maniuplates
> it if necessary.  Problem with this mechanism is that I'm getting an
> exception
>
> Previous method 'AppUser.get_Active();' requires a return value or an
> exception to throw.
>
> On a check of the Active flag within my Authenticate function.  For
> the time being I've reverted back to recording this expectation.  Any
> idea why Rhino Mocks is proxying my user object that is being returned
> or how to prevent it from doing so?
>
> >
>


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