title: AutoFixture can't create immutable object
body: <p>I'm coding some tests using AutoFixture in C# 8.0 but I'm had been problems, I guess, about class inheritance.</p>
  
  <p>For example, I have these classes:</p>
  
  <pre><code>public class Parent
  {
    public Guid Id {get; protected set;}
    public int Age {get; protected set;}
  
    public void SetAge(int age)
    {
        this.Age = age;
    }
  }
  </code></pre>
  
  <p>and the child class</p>
  
  <pre><code>public class Child: Parent
  {
    public string name {get; private set;}
  
    private Child() //I Need this because Migrations
    { 
    }
  }
  </code></pre>
  
  <p>After it, I use AutoFixture to test my class:</p>
  
  <pre><code> var fixture = new Fixture();
   fixture.Behaviors.Remove(new ThrowingRecursionBehavior());
   fixture.Behaviors
                      .OfType&lt;ThrowingRecursionBehavior&gt;()
                      .ToList()
                      .ForEach(b =&gt; fixture.Behaviors.Remove(b));
  fixture.Register&lt;Parent&gt;(() =&gt; null);
  
  fixture.Behaviors.Add(new OmitOnRecursionBehavior(recursionDepth: 3));
  
  fixture.Customize&lt;Child&gt;(c =&gt; c.FromFactory(new MethodInvoker(new GreedyConstructorQuery())));
  
  fixture.Customize&lt;Child&gt;(ce =&gt; ce.Do(x =&gt; x.SetAge(10));
  
  var childObject = fixture.Create&lt;Child&gt;();
  
  </code></pre>
  
  <p>and BOOM! I get an error at the moment when the fixture tries to create the object</p>
  
  <pre><code>"AutoFixture was unable to create an instance from the project, most likely because it has no public constructor, is an abstract or non-public type.
  </code></pre>
  
  <p>If I change private for the public constructor in Child class, when I set the Age, the object is created Empty. If I don't use SetAge method, the object is created without problems. </p>
  
  <p>Someone had this problem? Do I need to set some property in AutoFixture when I Use inheritance classes?</p>
  
  <p>Thank you</p>