Each generic argument is another "method". Unfortunately you can't
specify a single method call for any generic argument.

What you can do is writing a helper method that sets up the mock for
some predefined types.

On 24 Sep., 08:54, uTILLIty <[email protected]> wrote:
> Hi!
>
> I'm mocking a method
>
> T CreateDomainObject<T>() where T : IDomainObject
>
> instead of creating alot of explicit expectations I would like to
> create just one (IgnoreArguments()) and return a mock of the correct
> type requested in .Do(mi => mi.ReturnValue = ...)
>
> But I cannot find the place to access the generic type which was
> specified by the caller.
>
> regards, Tilli
--~--~---------~--~----~------------~-------~--~----~
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