MisterJames / GenFu

GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.
Other
831 stars 100 forks source link

[Records] Support constructor filling to create positional records #168

Open xperiandri opened 2 years ago

xperiandri commented 2 years ago

With the current requirement of the parameterless constructor, it is impossible to create positional records. I propose to rename IPropertyFiller into IValueFiller and add the ability to fill the largest (most parameters) constructor on instance creation. I already have a code that adds support for constructors filling.

xperiandri commented 2 years ago

In #169 it works if you try to get the instance of the configured type. But if you have 2 configured types and one takes another in the constructor, then that input instance is empty.