I find myself creating a significant number of wrapper classes, purely because I want to mock out the behaviour of
- Classes that don't lend themselves well to the RhinoMocks isolation model (for instance like
DirectoryInfo
orWindowsIdentity
) - Native Win API methods (I normally collect all the methods I need into a single class and wrap the native calls as a class method)
I then find myself appending the class that is wrapped with a 'W' (to indicate that it's a wrapper) and so I end up with DirectoryInfoW
(as opposed to DirectoryInfoWrapper
which seems rather verbose). Similarly, I end up with wrapped native methods called NativeMethods.DuplicateTokenW
.
What would be a good rule of thumb to follow when naming wrapper classes?