When to Expect and When to Stub?
I use NMock2, and I've drafted the following NMock classes to represent some common mock framework concepts: Expect : this specifies what a mocked method should return and says that the call must occur or the test fails (when accompanied by a call to VerifyAllExpectationsHaveBeenMet() ). Stub : this specifies what a mocked method should return but cannot cause a test to fail. So which should I do when? A lot of mocking frameworks are bringing the concepts of mocks & stubs closer & closer together to the point that they can be considered functionally almost the same. From a conceptual