O'Reilly logo

Extreme Programming Installed by Chet Hendrickson, Ann Anderson, Ron Jeffries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Does This Mean to Test Every Object and Every Method?

The rule is to test everything that could possibly break. To save time, don't test things that couldn't possibly break. There are more things that couldn't possibly break than you might imagine.

Start conservatively on identifying things not to test. Until you're sure, test. But unit testing is "white box" testing. You look at the code when you write the test, and if the code can't break, then don't test it.

Accessors can't break. There's no need to test them. Unless, of course, you have a tendency to forget to write them, and no other test is going to find that they're missing. But wait—if no other test is going to access them, they shouldn't be there anyway. So probably you don't need to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required