Tuesday, 28 July 2009

Rhino – Mock versus Stub

Questions always pop up on when we should use mocks and when we should use stubs.

To summarise the differences;

  • Stubs
    • Provide canned answers to calls made during tests
    • Don’t respond to anything else
  • Mocks
    • Setup expectations - behaviour that will be verified as part of the test

Links to articles that discuss same:

No comments:

Post a Comment