I am trying to use autofixture to create an object but there are certain properties that I want to always be defaulted (while the rest could be auto generated). However, wheneve
As noted by the accepted answer Customizations will override each other, so you would have to write a customization for every combination of properties you'd want to use.
I wrote a library that allows you to compose Customizations so that they don't override each other but rather get merged together. This would allow you to have one Customization for People named Ben
and one for Born in 1900
, and you can compose them together with the Compose function.
It doesn't quite address the original question, but it may give you some ideas on how to achieve what you want. The Compose function is accomplished by creating a custom IFixture implementation that handles the customizations.
https://github.com/LethargicDeveloper/Lift.AutoFixture
EDIT: I saw "active 4 months ago." I missed the "3 years." Sorry for resurrecting such an old post, but hopefully this will be useful.