There is an interesting problem if I want to use Rhino mocks instead of static (manual) ones:
MockRepository mocks = new MockRepository();
IProfileRepository mock = mocks.StrictMock<IProfileRepository>();
I can register (swap) real repository with mock:
However, in the presenter when the repository is instantiated, essentially it is
and here is where the problem comes in - Rhino mocks wants to control mock itself and it blows up with "no parameterless constructor defined".
One way of solving it as somebody pointed out, is the classical IoC/DI way - passing IProfileRepository to constructor, but that is a quick a bit of rework..