Hi,
In RhinoMocks 3.6 there is the TypeOf property in Arg<T>. It checks
that the argument is really of type T. I am new to mocks, so I am a
bit hesitant to ask if this is really useful. The compiler will not
let us pass anything else than a T as the argument.

What I'd like instead is what I think is in the docs, i.e. a TypeOf<U>
property, like this:

public T TypeOf<U>
    : where U : T
                {
                        get
                        {
                                ArgManager.AddInArgument(Is.TypeOf<U>());
                                return default(T);
                        }
                }


When a method accepts an abstract class as a parameter, it is useful
in a unit test to check that an argument is of a more derived type.

What do you think ?

Regards,
Jean-Marie

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