GenFu | generate realistic test data | Reflection library
kandi X-RAY | GenFu Summary
Support
Quality
Security
License
Reuse
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
GenFu Key Features
GenFu Examples and Code Snippets
Trending Discussions on GenFu
Trending Discussions on GenFu
QUESTION
List person = A.ListOf(20);
I'm performing mocking. For that i'm using Genfu nuget library to generate fake data for various properties. It does populate fake data but generates some duplicate data which I don't want.
I want the Id & Email property to be unique. How can this be achieved ?
ANSWER
Answered 2019-Mar-04 at 20:44I am afraid that's not currently possible.
See the tracking issue for more details.
You can play around with the fill to enforce unique on your own for certain members.
A.Configure()
.Fill(x => x.Id, x => myOwnWayToEnforceUniqueness());
Of course that kills the point of using a mocking library but it can be helpful if unique does not matter for the rest of the fields.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GenFu
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page