The Difference Between Mocks and Stubs
10 June 2009
340 views
No Comment
Found this Fowler article pretty insightful when thinking about the difference between mocks and stubs. New to the mocking scene, I didn’t understand the difference at first, but the latter part of the portion I have linked to states that Mocks are used to validate behavior whilst Stubs are used to validate state . Looking at the two example tests, the difference between the two types of tests becomes readily apparent. One tests the certain methods fired, and the other tests that properties of an object contain the values that we thought they should be.
http://www.martinfowler.com/articles/mocksArentStubs.html#TheDifferenceBetweenMocksAndStubs










Leave your response!