AutoBogus icon indicating copy to clipboard operation
AutoBogus copied to clipboard

Unable to generate instance if a property is for an abstract type

Open PureKrome opened this issue 2 years ago • 4 comments

I have a full repo code showing that AutoBogus cannot create a new instance of something, if that-something has a property which is an abstract type.

I thought the documentation said that it will revert this property to null?

Here's the full code which reproduces this problem: https://dotnetfiddle.net/yDQh82

Is this a bug on my end, or with AutoBogus? Is there a way to "hint" to AutoBogusthat it should SKIP any property decorated with some custom code, which means I can avoid this issue.

PureKrome avatar Apr 08 '23 01:04 PureKrome

@PureKrome I created some tests around this and confirmed it's working in soenneker.utils.autobogus

soenneker avatar Apr 29 '24 21:04 soenneker

@soenneker so does this mean a PR is maybe required here to move any of your code fixes into the main codebase, here?

PureKrome avatar Apr 29 '24 23:04 PureKrome

@PureKrome this repository hasn't been updated in years.

Any changes made in my repo are not being made to port over, as the architecture is incompatible.

soenneker avatar Apr 30 '24 00:04 soenneker

image

PureKrome avatar Apr 30 '24 00:04 PureKrome