Test Everything Example

Regarding our rule, Test everything that could possibly break, a correspondent wrote to Ron:

"Everything" means just that, right? Software can do lots of desirable and undesirable things, and XP is supposed to test for everything.

That strikes me as either impossible (number of execution cycles approaches infinity) or vague (we know the previous, so we test for almost everything or some other such subset).

Here's a short example of how we would test an object. We'll do the thing in Smalltalk because we can do it faster. We'll comment the code for folks who don't know Smalltalk very well. We're sure you'll do fine.

The task is to build a class named Account that holds collections of transactions and that can answer the ...

Get Extreme Programming Installed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.