This post originated from an RSS feed registered with Agile Buzz
by Joe Walnes.
Original Post: OT2004 : Mock Objects: Driving Top-Down Development
Feed Title: Joe's New Jelly
Feed URL: http://joe.truemesh.com/blog/index.rdf
Feed Description: The musings of a ThoughtWorker obsessed with Agile, XP, maintainability, Java, .NET, Ruby and OpenSource. Mmm'kay?
Nat and I were first up with our talk on Mock Objects. Yes, we are still harping on about them :).
Here's what we covered:
OO concepts: an application is a web of collaborating objects, each providing a distinct responsibility and taking on multiple roles to provide services to other objects.
How the process of using mock objects complements TDD to drive out the design of these responsibilities and roles.
How our original usage of mocks for testing system boundaries such as databases, web-apps, GUIs, external libraries turned out to be a bad approach and the success we started achieving when inverting this to only mock types we can change.
The process of using mocks very quickly points out key abstractions in your system, difference in responsibilities between objects and services objects require.
Clearing up misconceptions about mocks, including: not using them at system boundaries and what they actually are (not stubs, not recorders, no behaviour).
Our first public demonstration of the new JMock API to walk through a single iteration of the process.