Can I execute the body of a virtual method that lives on an abstract class which has been mocked using Rhino Mocks?
To be clear, I’m not trying to mock the behavior of the virtual method. I’m trying to /test/ the virtual method (on the mocked class).
Is this idea a blatant misuse of Rhino Mocks?
Yes, that should be absolutely fine. I can’t say I’ve tried it, but I’d be very surprised if it failed.
EDIT: I suspect you want the
PartialMockmethod. Here’s an example:EDIT: Or in my first attempt at AAA: