Wednesday, January 21, 2015

Private Methods to Separate Classes

...if you have the urge to test a private method, the method shouldn't be private; if making the method public bothers you, chances are, it is because it is part of a separate reponsibility; it should be on another class." [Working Effectively With Legacy Code (2005) by M. Feathers]
quoted by 'blank' at http://stackoverflow.com/questions/7075938/making-a-private-method-public-to-unit-test-it-good-idea

No comments:

Post a Comment