title: Mock abstract class default behaviour with Rhino
body: <p>I'm pretty new to mocking so this might be something I'm just not picking up on yet, but I can't find a good example anywhere.</p>
  
  <p>I'm trying to assert that by default, any class that inherits from my abstract class will instantiate a collection in the constructor.  Here's the abstract class:</p>
  
  <pre><code>public abstract class DataCollectionWorkflow : SequentialWorkflowActivity
  {
          private readonly DataSet _output = new DataSet();
          private List&lt;DataCollectionParameter&gt; _params = null;
  
          public DataCollectionWorkflow()
          {
              _params = new List&lt;DataCollectionParameter&gt;();   
          }
  
          public virtual IList&lt;DataCollectionParameter&gt; Parameters
          {
              get { return _params; }
              set { _params = (List&lt;DataCollectionParameter&gt;)value; }
          }
  }
  </code></pre>
  
  <p>How do I mock this with Rhino?  If I do a <code>GenerateMock&lt;DataCollectionWorkflow&gt;</code> (or a stub), the constructor runs and the mock's private field "<code>_params</code>" gets initialized, but the mock's "<code>Parameters</code>" property is simply null.</p>
  
  <p>Obviously the generated mock subclass is overriding the property implementation.  Is there some way of excluding the Parameters property from being re-implemented?</p>
  
  <p>Thanks.</p>