title: How to mock data access in private methods
body: <p>I would like to ask how can I use rhino mocks with in the next example:</p>
  
  <pre><code>   Public Class CustomerService 
      {
        Public void Register()
       {
           Action1();
           Action2();
       }
  
      private action1 ()
       {
         //this is a call to other dll.
         var isExist = _dataComponentService.CheckIfUserExist(userName);
       } 
     private action2()
       {
         //do some more work...
         // Call to dataComponentService. write some data in the database....
       }
      }
  </code></pre>
  
  <p>this is only an example for the real code I need to update. 
  The current unit tests are making a real call to the database service.
  I would like to write a unit tests that checks the behavior in the public Register() with out needing to make a real call to the database service. </p>
  
  <p>is it possible to mock a call to other component that is located in private method without needing to re-write the hole service?</p>
  
  <p>thank you in advanced</p>
  
  <p>Ori</p>