While I love the simplicity of this analogy, I find multiple flaws with it. I agree with one of the commentors that it isn't a great analogy because the process of getting money from everyone doesn't relate much to testing. However, the larger issue that I have with it is that it paints an either/or scenario. The group is never going to pay with separate checks and with a single check.
So, I have thought up a similar analogy that I believe is a little more appropriate.
The Pickle
Lets say we have a pickle. How do we determine if it is a good pickle? We can probably come up with a set of checks, such as..
- Is the the juice tangy or acidic enough?
- Is the pickle stock crisp?
- Others?
The Milk
Now imagine that we have a glass of milk. We can define an independent set of quality checks for this unit, too.
- Is the milk sour to the taste?
- Does the milk smell funny?
- Other?
Pickles & Milk
Now, imagine we have an application (recipe) in which we wish to use these units (ingredients). The application calls for hearty doses of both pickles and milk. Similar to our unit tests, we should identify some quality attributes.
- Does the milk curdle?
- Is it just plain yucky?
The point is, while the individual units might pass all their checks, there still may be some integration issues. Unit testing and integration testing serve different purposes. If you have unit tests, but no integrations tests, you may find yourself in a pickle.