October 2000
Intermediate to advanced
288 pages
5h 45m
English
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 ...
Read now
Unlock full access