Mocking a private field
问题 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. So I have an earlier method in my class: public bool validateAll(ref DataEntry[] oEntries, string sMediaPlanId, ITemplateGenerator oTempGen) { ... // private field that I am trying to mock this._sMediaPlanObjective = (MPWrapper