Using RhinoMocks, how do you mock or stub a concrete class without an empty constructor?
- by Mark Rogers
Mocking a concrete class with Rhino Mocks seems to work pretty easy when you have an empty constructor on a class:
public class MyClass{
public MyClass() {}
}
But if I add a constructor that takes parameters and remove the one that doesn't take parameters:
public class MyClass{
public MyClass(MyOtherClass instance) {}
}
I tend to…