Force AutoFixture to use the greediest constructor
I have a data type with multiple constructors and I need AutoFixture to choose the greediest (one with the most parameters). The default behaviour is to choose the constructor with the smallest number. The author's blog post, http://blog.ploeh.dk/2009/03/24/HowAutoFixtureCreatesObjects.aspx doesn't seem to imply there's a way of overriding this behaviour, so is it possible, and if so, how? This is certainly possible . To change the strategy for a single type ( MyClass ): fixture.Customize<MyClass>(c => c.FromFactory( new MethodInvoker( new GreedyConstructorQuery()))); To change the strategy