AutoBogus icon indicating copy to clipboard operation
AutoBogus copied to clipboard

Unable to fake immutable collection properties

Open gnalvesteffer opened this issue 1 year ago • 1 comments

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.

gnalvesteffer avatar Apr 18 '24 20:04 gnalvesteffer

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

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

soenneker avatar Apr 29 '24 18:04 soenneker