title: Mocking a private field
body: <p>I know a similar question has been asked but I have not found a clear solution. I'm trying to mock a private field from a large class. The private field gets instantiated in some earlier method and I'm trying to unit test a latter method which references the field.</p>
  
  <p>So I have an earlier method in my class:</p>
  
  <pre><code>public bool validateAll(ref DataEntry[] oEntries, string sMediaPlanId, ITemplateGenerator oTempGen)
  {
    ...
    // private field that I am trying to mock
    this._sMediaPlanObjective = (MPWrapper.Instance).getMediaPlanObjective(sMediaPlanId);
    ...
  }
  </code></pre>
  
  <p>And I'm trying to Unit test a method that references the private field:</p>
  
  <pre><code>public bool validateFlightObjective(ref MPDataEntry oEntry)
  {
    ...
    string entryFlightObjective = oEntry.getFlightObjective();
    string mediaPlanObjective = this._sMediaPlanObjective;
  
    if (entryFlightObjective != mediaPlanObjective)
    {
      return false;
    }
    ...
  
    return true;      
  }
  </code></pre>
  
  <p>Given that I have a large class and this is just one method I want to test, is there a possible way to just mock this private field? Am I missing something basic or should I consider some other approach?</p>