title: Example of how to use AutoFixture with NSubstitute
body: <p>I use NSubstitute a lot.  And I love it.</p>
  
  <p>I am just looking into AutoFixture.  It seems great!</p>
  
  <p>I have seen <a href="http://www.nuget.org/packages/AutoFixture.AutoNSubstitute">AutoFixture for NSubstitute</a> and seen a few examples in Moq on how to use this feature.</p>
  
  <p>But I can't seem to translate it into NSubstitute.</p>
  
  <p>I tried this: </p>
  
  <pre><code>var fixture = new Fixture().Customize(new AutoNSubstituteCustomization());  
  var addDest = Substitute.For&lt;IPerson&gt;();
  </code></pre>
  
  <p>Using:</p>
  
  <pre><code>public interface IPersonEntity
  {    
     int ID { get; set; }
     string FirstName { get; set;}
     string LastName { get; set;}
     DateTime DateOfBirth { get; set; }
     char Gender { get; set; }    
  }
  </code></pre>
  
  <p>And I get an object, but none of the properties are populated (kind of the point of AutoFixture).</p>
  
  <p>I also tried:</p>
  
  <pre><code>var fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
  var result = fixture.Create&lt;IPersonEntity&gt;();
  </code></pre>
  
  <p>That also gave me an object with no populated properties.  (Note if I do the above with a <code>PersonEntity</code> class, then the properties are all populated.)</p>
  
  <p>I am sure that there is a way to make this work, but I can't seem to find it.</p>
  
  <p><strong>So, given my <code>IPersonEntity</code> interface above, does anyone know how to use AutoFixture and NSubstitute to give me a populated IPersonEntity object?</strong></p>