title: Stub setter in Rhino Mock partial mock
body: <p>I'm following the accepted answer in this <a href="https://stackoverflow.com/questions/2771665/how-to-mock-a-property-setter-on-a-partialmock-using-rhino-mocks">question</a> but I'm getting a <code>NullReferenceException</code>.</p>
  
  <p>What I need is having a partial mock stub a property (both getter and setter) to behave like a stub (as a simple automatic property). Currently I am able to stub the getter but not the setter.</p>
  
  <p>Is this possible?</p>
  
  <p>EDIT: this is a simple example, I hope it helps explaining my problem.</p>
  
  <pre><code>public class SomeClass
  {
   public virtual string SomeProperty
   {
    get{ return SomeMethodDependingOnDBOrAspSession(); }
    set{ SomeMethodDependingOnDBOrAspSession(value); } // I want to avoid calling this setter implementation
   }
  }
  
  var partialMock = MockRepository.GeneratePartialMock&lt;SomeClass&gt;();
  partialMock.Stub(p =&gt; p.SomeProperty); // I want SomeProperty to behave as an automatic property
  </code></pre>