nickdodd79 / AutoBogus

A C# library complementing the Bogus generator by adding auto creation and population capabilities.
MIT License
422 stars 49 forks source link

Unable to fake immutable collection properties #111

Open gnalvesteffer opened 2 months ago

gnalvesteffer commented 2 months ago

When attempting to fake types that have immutable collection properties (i.e. IImmutableList), AutoFaker.Generate<T>() throws an exception due to not being able to find a parameterless constructor for the immutable type, since immutable collections are instead created via the type's .Create() method.

soenneker commented 2 months ago

@gnalvesteffer ImmutableList/IImmutableList is now implemented in soenneker.utils.autobogus

Let me know if you have use for other Immutable types.