{ |one, step, back| } 1 of 1 article WikiSyndicate: full/short

Miller on Mock Objects   07 May 04
[ print link all ]
Charles Miller reminds us that there are two reasons for using mock objects.
  1. To create an environment where the object under test can live.
  2. To test that the object under test correctly modifies the environment.

Each use requires a slightly different API (#1 sytle APIs tend to be more flexible than style #2). I’ve used both styles of APIs in the past (and had been frustrated trying to use a style #2 API in a style #1 situation), but I hadn’t connected the differences with the reason for the differences before.

 

Formatted: 17-May-08 18:04
Feedback: jim@weirichhouse.org