///<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);
        }
Beispiel #2
0
        ///<summary>
        ///  Update the Typed Illustration Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance(TransactionManager tm, Illustration mock)
        {
            IllustrationTest.UpdateMockInstance_Generated(tm, mock);

            // make any alterations necessary
            // (i.e. for DB check constraints, special test cases, etc.)
            SetSpecialTestData(mock);
        }
Beispiel #3
0
        ///<summary>
        ///  Returns a Typed Illustration Entity with mock values.
        ///</summary>
        static public Illustration CreateMockInstance(TransactionManager tm)
        {
            // get the default mock instance
            Illustration mock = IllustrationTest.CreateMockInstance_Generated(tm);

            // make any alterations necessary
            // (i.e. for DB check constraints, special test cases, etc.)
            SetSpecialTestData(mock);

            // return the modified object
            return(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;
        }