title: Should Private/Protected methods be under unit test?
body: <p>In TDD development, the first thing you typically do is to create your interface and then begin writing your unit tests against that interface. As you progress through the TDD process you would end-up creating a class that implements the interface and then at some point your unit test would pass.</p>
  
  <p>Now my question is about the private and protected methods that I might have to write in my class in support of the methods/properties exposed by the interface:</p>
  
  <ul>
  <li><p>Should the private methods in the class have their own unit tests?</p></li>
  <li><p>Should the protected methods in the class have their own unit tests?</p></li>
  </ul>
  
  <p>My thoughts:</p>
  
  <ul>
  <li><p>Especially because I am coding to interfaces, I shouldn't worry about protected/private methods as they are black boxes.</p></li>
  <li><p>Because I am using interfaces, I am writing unit tests to validate that the contract defined is properly implemented by the different classes implementing the interface, so again I shouldnt worry about the private/protected methods and they should be exercised via unit tests that call the methods/properties defined by the interface.</p></li>
  <li><p>If my code-coverage does not show that the protected/private methods are being hit, then I don't have the right unit-tests or I have code thats not being used and should be removed.</p></li>
  </ul>