Closed plaisted closed 5 years ago
Hi @plaisted
Ignoring properties with valid setters is not intentional. Can you provide an example of where this is happening and I will investigate.
Nick.
I created a minimal example to show the error but it populated correctly. I'll dig into the project that I had problems with and reopen if I can narrow the problems down to something with AutoBogus.
Okay, this turned out to be something due to AutoBogus populating a protected field and wiping out the internal state of the object.
@nickdodd79 , is there a way to have it ignore a field/property? I tried .RuleFor() but couldn't find a way to just get it to do nothing to a particular field.
Hey @plaisted
Currently AutoBogus executes on the basis that all properties are to be populated. The RuleFor
approach is the workaround at the moment.
Another issue (#17) was raised not long before yours which also asked for a setting to ignore properties. I will start looking at including this and let you know when it is ready. I will also post all updates in the other issue thread.
Thanks. Nick.
Properties with custom getters and setters appear to be ignored. Is this intentional? Is there a way to force these to be faked?