Often I am asked variations on this question: Should I unit test private methods?
The Visual Studio Team Test blog describes the Publicize testing technique in Visual Studio as one way to unit test private methods. There are other methods.
As a rule of thumb: Do not unit test private methods.
Encapsulation
The concept of encapsulation means that a class's internal state and behavior should remain "unpublished". Any instance of that class is only manipulated through the exposed properties and...
Published on March 02, 2012 07:32