jMock: supporting responsibility-based design with mock objects

  • Authors:
  • Steve Freeman;Tim Mackinnon;Nat Pryce;Joe Walnes

  • Affiliations:
  • ThoughtWorks UK, High Holborn, London;ThoughtWorks UK, High Holborn, London;ThoughtWorks UK, High Holborn, London;ThoughtWorks UK, High Holborn, London

  • Venue:
  • OOPSLA '04 Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
  • Year:
  • 2004

Quantified Score

Hi-index 0.01

Visualization

Abstract

In this demonstration we will show the flow of the Mock Object development process by pair-programming to develop a code example. During the session, we will introduce the declarative jMock API and show how we use it to describe relationships between objects when developing test-first. We will show how this approach helps developers concentrate on real requirements and how it encourages a design in which objects are focused with well-defined responsibilities. We will also show our practices for maintaining the readability of tests written using jUnit with jMock. This work is described in a Practitioner Report at this conference, "Mock Roles, Not Objects".