> On 05 Mar 2015, at 22:20, [email protected] wrote: > > Hi all, > > in SUnit do we typically test methods found on the class side that are in > "instance creation" and "class initialization" protocols? > >
There’s a lot of personal preference involved there :) If your creation / init methods contain some non-trivial logic (e.g. more than setting values) then I suggest you write tests. Otherwise, using the objects in other tests automatically covers creation and initialization (at least for the trivial cases). > Also, do we test methods found on the instance side but in the protocol of > private? > > Yes, absolutely, if they are not simply “private getters / setters”. Black box testing just doesn’t cut it in my experience. Private methods can often contain important code that needs to be tested but simply is not inteded for the public to be used. Cheers, Max > Many thanks, > > Sheridan >
