We have a class called
ClassName that represents ... wait for it ... a class name. One of the strengths of Agitator is that, if you need a particular type to construct the object under test, it will go and make one for you - and Agitator is extremely good at finding those edge cases that you didn't think of. I recently inherited a bunch of code (and tests) from someone else that used
ClassName extensively. He - or rather, Agitator - discovered that his code would break if passed a
ClassName that was the empty string. In this situation he had three options :
ClassNameto disallow the empty string
Unfortunately for me, he went with option 3 as I discovered when someone else just updated ClassName and all his tests (about 50 of them) started failing because they no longer received empty strings.
Posted by Kevin Lawrence at September 13, 2004 10:45 AM
TrackBack URL for this entry: