[This is preliminary documentation and is subject to change.]
- parent (Persistent)
- The object which will is or will become the parent of the one being written. If this object has just been created, this method is called before this object is adopted by the parent. For singletons, this will be null.
- index (Int32)
- The index of this object in its parent collection, or -1 if this is a scalar object.
- parameters (CreateTestDataParameterSet)
- An object containing parameters used in creating the test data. This contains values determining the range of several and many collection sizes to create, and also a list of object classes determining which types of object should be created.
This method fills all data members with random data based on the type of the member, and an index. It also creates any scalar object members which are currently null and calls this method on them. If a contained scalar object already exists, then this method is optionally called on it. If a contained collection is empty, then a random number of objects is created and added, and this method called on them.
You can override this method to provide your own test data. If you do, you must recurse as necessary to create the entire tree under the object you are writing.
This method does not create any associations - this is done by the WriteTestAssociations method. This latter method along with this one is used by the CreateTestData operation to create an entire tree of test data for your application.