CreateMockInstance() static public method

Returns a Typed Illustration Entity with mock values.
static public CreateMockInstance ( TransactionManager tm ) : Illustration
tm TransactionManager
return Nettiers.AdventureWorks.Entities.Illustration
        ///<summary>
        ///  Returns a Typed ProductModelIllustration Entity with mock values.
        ///</summary>
        static public ProductModelIllustration CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductModelIllustration mock = new ProductModelIllustration();

            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Illustration mockIllustrationByIllustrationId = IllustrationTest.CreateMockInstance(tm);

            DataRepository.IllustrationProvider.Insert(tm, mockIllustrationByIllustrationId);
            mock.IllustrationId = mockIllustrationByIllustrationId.IllustrationId;
            //OneToOneRelationship
            ProductModel mockProductModelByProductModelId = ProductModelTest.CreateMockInstance(tm);

            DataRepository.ProductModelProvider.Insert(tm, mockProductModelByProductModelId);
            mock.ProductModelId = mockProductModelByProductModelId.ProductModelId;

            // create a temporary collection and add the item to it
            TList <ProductModelIllustration> tempMockCollection = new TList <ProductModelIllustration>();

            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);


            return((ProductModelIllustration)mock);
        }
        ///<summary>
        ///  Update the Typed ProductModelIllustration Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductModelIllustration mock)
        {
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Illustration mockIllustrationByIllustrationId = IllustrationTest.CreateMockInstance(tm);

            DataRepository.IllustrationProvider.Insert(tm, mockIllustrationByIllustrationId);
            mock.IllustrationId = mockIllustrationByIllustrationId.IllustrationId;

            //OneToOneRelationship
            ProductModel mockProductModelByProductModelId = ProductModelTest.CreateMockInstance(tm);

            DataRepository.ProductModelProvider.Insert(tm, mockProductModelByProductModelId);
            mock.ProductModelId = mockProductModelByProductModelId.ProductModelId;
        }