title: It is a good Practice to change Private method to Public for Unit Test Case
body: <p>Recently, I was working on the unit test case of legacy code, while writing test cases, I am come up with a problem.</p>
  
  <p>Since I am writing unit test case not integration test. The problem is with <strong>private</strong> method. In our code a <strong>public method</strong> is dependent on 5 <strong>private method</strong>.</p>
  
  <p>For unit test case, I required to give fake implementation of private method, but since method is private, I can't able to-do so.
  Because <strong>MOQ mocking framework</strong> did not support the mocking functionality of private method. and even I can't able to write test case of private method.</p>
  
  <p>Possible approach I was thinking</p>
  
  <p>Move all private method in different class. and make them public and also create an interface of this class. In this way I can able to give fake implementation at run-time because now we have Interface of the class.</p>
  
  <p>But the problem in this approach is I need to make this private method to public just for unit test case. so it is a good practice to make it public.</p>