Like with any approach there are certain limitations
when using mock objects. At the moment, when using Rhino Mocks, you cannot
create a mock object from a sealed class, you cannot create a mock object from
a private interface and you cannot intercept calls to non-virtual methods.
Also, trying to mock part of the .NET Framework is not
recommended. Instead, create a wrapper around the calling code like we
did here and abstract away from the .NET implementation as you will find it
much easier to setup the mock environment and test against the code.