-
Notifications
You must be signed in to change notification settings - Fork 1
Create interface abstract class
TheCodeKing edited this page Jul 16, 2011
·
3 revisions
Overview | How To | Create Interface / Abstract Class
The library will automatically generate proxy classes to enable the creation of interface and abstract class types. When creating instances from an interface
the instance must be cast explicitly as interfaces cannot be implicitly cast. Do not use the var
keyword without referencing the created instance explicitly with Object
.
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. In addition any methods created on proxy classes with also be given auto generated return values.
IPerson person = Auto.Make<IPerson>().Object;
var person = Auto.Make<IPerson>().Object;