-
Notifications
You must be signed in to change notification settings - Fork 1
Create An Instance
TheCodeKing edited this page Jul 16, 2011
·
6 revisions
Overview | How To | Create An Instance
Creating an instance using the library is easy using the Generic interface. Classes are implicitly cast to the generic type, or can be referenced explicitly using the Object property. Do not use the var keyword without casting the instance, or referencing the created instance explicitly.
Once created all of the public members will be recursively populated with test data. By default strings are set to the name of the containing member, and value types are set to their corresponding MaxValue.
Person person = Auto.Make<Person>();
var person = Auto.Make<Person>().Object;
var person = (Person)Auto.Make<Person>();