-
Notifications
You must be signed in to change notification settings - Fork 100
Property Fillers
Property fillers are what you're going to like about AngelaSmith. The objects you have will be evaluated using reflection, and each property will be checked against the default "rules" that are built into the library.
There are literally billions of combinations of properties and the data generated looks real. When you need to put together some sample data, if you need design-time data, or if you want to seed your database, AngelaSmith is the fastest, easiest way to go about this. She can drop up to tens of thousands of objects per second.
For the time being, AngelaSmith is really only looking at the name of the property, but we're working on a simple, extensible rules-based system that would allow you to override the property setters and create your own.
This is a growing list, but here's what Angela can do for you on her own (case insensitive):
- FirstName, fname, first_name
- LastName, lname, last_name
- Address, address1
- Address2, address_2 (randomly may fill in Apt, Suite etc.)
- Title (for article or blog post)
- Email, email_address, emailaddress
- City
- State (American states are loaded by default)
- Province (Canadian provinces are loaded by default)
- Fax, phone, phonenumber, phone_number, homenumber, worknumber (fills in a 10 digit number)
- Age
If the above properties (which are mostly strings) are not picked up, AngelaSmith will try to fill in your property if it is one of the below known types. This is a growing list.
- String
- Int
- DateTime
The types are setup with the following defaults:
- Strings are just random words
- Ints are numbers 0-100
- DateTime is a date between DateTime.MinValue and DateTime.MaxValue
Each rule for a known type can be set using the fluent methods. For example:
var person = Angie
.Configure()
.MaxInt(maxAge)
.Make<Person>();