Any reading or advice I\'ve been given on Unit Testing has always suggested a distinct difference between the definition of a Mock and a Stub. My current understanding of these
According to the Moq project site, Moq provides:
Granular control over mock behavior with a simple MockBehavior enumeration (no need to learn what's the theoretical difference between a mock, a stub, a fake, a dynamic mock, etc.)
The lack of distinction between mocks, stubs, and such is a deliberate design decision; A design decision which I, for one, prefer. If I need a true mock, I call Verify()
on it. If not, there's no Verify()
. I like the simplicity, and I haven't found myself missing the distinction between mock
and stub
.