I would like to mock a class (i.e. with RhinoMocks) for which I don't have access to the code for (like say ManagementObject or ManagementObjectCollection) and for which methods/properties I am interested in
- isn't virtual
- isn't defined in an interface which the class implements
The way that I have been getting around this is to implement wrappers for these classes and to mock (and use) these wrappers.
Are there alternatives to this method?