Rhino Mocks Limitations
I'm getting a lot of questions recently about Rhino Mocks, and I wanted to address the common one here.
Rhino Mocks at the moment has two major limitations:
- It cannot mock interfaces or classes with generic methods, like this one:
public interface IFoo
{
public void Foo<T>();
} - It cannot mock interfaces or classes with muli dimentional arrays, like this one:
public interface IBar
{
public void Bar(string [,] strs);
}
These two issues are known problems in Dynamic Proxy, both should be addressed in the next release of Dynamic Proxy (2.0), which is currently under work.
Beyond that, of course, there is the limitation of being able to mock only methods / properties / events that are marked as virtual. This is not something that is likely to change.
Comments
Comment preview