From: Gavin Sinclair Date: 2003-09-04T19:59:07+09:00 Subject: Re: [OT] Unit Tests and Encapsulation On Thursday, September 4, 2003, 12:42:04 PM, Scott wrote: > What that means is that in unit testing the drawing commands, there is > no way for a class outside of the BezierContour class to make sure that > the commands were recorded properly short of drawing the path and > comparing the resulting picture with a previously verified picture > (ick!) It might sound icky, but isn't that what unit tests are supposed to do: verify the output of a class? If you want to remove the ick, I'd redesign the program to be more test-friendly. That's something I've faced in the past, and haven't really had the opportunity to try out yet. But it's probably good in general to prefer test-friendly class design, all else being equal. Cheers, Gavin