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.

Print | posted on Wednesday, July 19, 2006 9:18 PM

Feedback


Gravatar

#  7/20/2006 8:17 AM Scott

About the second problem (rectangular arrays), TypeMock has also got that problem, you can see a detailed explanation here:
http://www.typemock.com/community/viewtopic.php?t=118


Gravatar

# New and Notable 110 2/3/2007 7:48 AM codebetter.com


Gravatar

# New and Notable 110 2/3/2007 7:48 AM codebetter.com

Comments have been closed on this topic.