Advanced Test-First with Mock Objects

This workshop moves onto more advanced topics in Test-First programming. The workshop will demonstrate how to keeping individual tests well isolated. The key to this is applying Responsibility-Driven Design. You will learn how to use Mock Objects in unit tests to support Emergent Design by clarifying an object's responsibilities and its relationships with its neighbours. The hands-on exercises will provide an introduction to the jMock framework. This workshop assumes basic Java knowledge.

Objective:
To appreciate how to apply Responsibility-Driven Design.
To understand how to use Mock Objects to decrease object dependencies.
To write JUnit tests using jMock.

XP practices covered: Test-First Programming, Emergent Design.

Reading:
cover
"Test-Driven Development" by Kent Beck
cover
"Object Design: Roles, Responsibilities and Collaborations" by Rebecca Wirfs-Brock, Alan McKean