OOPSLA '04

Program
Technical Program
  Invited Speakers
  Technical Papers
  Onward!
  Panels
  Practitioner Reports
  Tutorials
Workshops
DesignFest
Educators' Symposium
Demonstrations
Posters
Doctoral Symposium
Exhibits
Student Research Comp.
FlashBoF
 
Turing Lecture
 
Social Events
 
Week at a Glance
 
Final Program (1.5M .pdf)

Find in Program
 

Page
Printer-friendly

Basket
view, help

"jMock. Supporting Responsibility-Based Design with Mock Objects"
Object-Oriented Programming, Systems, Languages and Applications
Home    Program    Housing & Transportation    Registration    Submissions    Wiki    Maps
 


 : Tuesday Demonstrations : All Demonstrations : Tuesday

jMock. Supporting Responsibility-Based Design with Mock Objects

Courtyard, Demo room 1
Tuesday, 12:30, 45 minutes
 


 
7·8·9·10·11·12·13·14·15·16·17·18·19·20·21

This event is also being given Wednesday at 11:30.

Steve Freeman, ThoughtWorks
Tim Mackinnon, ThoughtWorks
Nat Pryce, ThoughtWorks
Joe Walnes, ThoughtWorks

Demonstration number: 2

jMock is a dynamic Mock Object framework that supports responsibility-based design when programming test-first.

Test-Driven Development with Mock Objects is a technique for concentrating on the relationships between objects. It guides the programmer to discover the precise dependencies that an object has on its neighbours, and the interfaces that describe those dependencies. This is much more powerful than the usual use of Mock Objects which is to support development against third-party libraries. jMock allows the programmer great flexibility in describing interactions between objects. We have also taken care to develop an API that makes tests readable and self-explanatory; in effect, we have written a domain-specific language for testing that sits in Java and C#.

In this demonstration we will show the flow of the mock object development process. We will show how using mock objects to guide your design results in a more effective form of test driven development and more flexible code; how mock objects allow you to concentrate more on end-user requirements than on infrastructure; and how the objects in the resultant code are small and loosely coupled, with well-defined responsibilities. We will also provide a tour of the structure of the jMock libraries.