I’ve recently read an excellent article by Jerrie Pelser about using NBuilder and Faker.Net to generate test data for your .Net project – something I actually need on a regular basis.
However, I needed data that looked a bit more South African so, I’ve added some South African flavour to Faker.Net. You can now generate South African names, surnames, provinces and actual valid ID numbers for use as test data in your project.
In the following example I generate 100 client records with random South African names, surnames, provinces and ID numbers:
You can get the code on Github.
Resources used for this article:
- Create test data with NBuilder and Faker by Jerrie Pelser
- How to Generate Better Random Numbers in C# .NET by Ben Klopfer
- How to validate SA Identity Numbers by Willem Fourie
- What is a South African ID number made up of? by Robert MacLean
- The most common first names in South Africa by http://www.name-statistics.org
- The most common surnames in South Africa by http://www.name-statistics.org