Closed Ian1971 closed 3 years ago
I've created a PR showing how it works https://github.com/nickdodd79/AutoBogus/pull/64
Hey @Ian1971
Thanks for your contribution. I have just pushed 2.13.0 which includes you template PR 👍
Nick.
@nickdodd79
Just noticed the docs you added are missing the new lines, so it would fail.
Hey @Ian1971
Because the string starts with @
it honors the new lines. I also have a test in the playground to check this above worked.
Nick.
Brilliant. I never knew that. That makes our usages tidier.
On Mon, Mar 15, 2021 at 8:31 PM Nick Dodd @.***> wrote:
Hey @Ian1971 https://github.com/Ian1971
Because the string starts with @ it honors the new lines. I also have a test in the playground to check this above worked.
Nick.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nickdodd79/AutoBogus/issues/63#issuecomment-799730618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN2SK5PC3AA5Q5J4U27GLTDZVBBANCNFSM4X4LYLCA .
Some time ago I created a library we use internally which also sits on top of Bogus. It is broadly very similar to AutoBogus, but AutoBogus is better and more comprehensive. In fact we have migrated the internals of the library to AutoBogus recently. One thing though that we have is the ability to generate data via a delimited string, where fields that are in the string use the values from the string, but everything else is auto generated. e.g. The string looks like this
and is used like this
We find this useful in some unit tests, because the tests can succinctly set up their test data and they only need to set up the values they care about. It is easier to see at a glance the test data.
Anyway, I am mentioning it because I wanted to share it and I wanted to get your opinion on it and where it should live. Should it be a separate nuget package, and if so what should I call it? e.g. it could be used like
new AutoFaker<Person>().CreateData();
Thanks Ian