Unit Testing with Mock Objects

by Ben Teese () 25th November 2004

Recently on a medium-sized project I did a lot of work developing unit tests using the 'Mock Objects' pattern. Whilst I had used this pattern before, this was the largest piece of work to-date. In doing so I learnt a lot about unit testing and believe I went to the very limit of what can be tested.

This page and its children talk about unit testing with the Mock Objects pattern. In particular, it covers what Mock Objects are, what tools I have used, and important lessons I have learnt along the way. Its pages can be traversed in the following order:

  1. What Are Mock Objects?
  2. DynaMock - A Mock Object Testing Framework
  3. Experiences With Mock Objects
  4. Conclusions on Unit Testing with Mock Objects

Next... What Are Mock Objects?

Powerpoint Presentation

I've also prepared a presentation that covers this topic and includes some different examples.