///<summary>
        ///  Returns a Typed TransactionHistory Entity with mock values.
        ///</summary>
        static public TransactionHistory CreateMockInstance_Generated(TransactionManager tm)
        {
            TransactionHistory mock = new TransactionHistory();

            mock.ReferenceOrderId     = TestUtility.Instance.RandomNumber();
            mock.ReferenceOrderLineId = TestUtility.Instance.RandomNumber();
            mock.TransactionDate      = TestUtility.Instance.RandomDateTime();
            mock.TransactionType      = TestUtility.Instance.RandomString(1, false);;
            mock.Quantity             = TestUtility.Instance.RandomNumber();
            mock.ActualCost           = TestUtility.Instance.RandomShort();
            mock.ModifiedDate         = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((TransactionHistory)mock);
        }
Пример #2
0
        ///<summary>
        ///  Returns a Typed SpecialOfferProduct Entity with mock values.
        ///</summary>
        static public SpecialOfferProduct CreateMockInstance_Generated(TransactionManager tm)
        {
            SpecialOfferProduct mock = new SpecialOfferProduct();

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

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
            //OneToOneRelationship
            SpecialOffer mockSpecialOfferBySpecialOfferId = SpecialOfferTest.CreateMockInstance(tm);

            DataRepository.SpecialOfferProvider.Insert(tm, mockSpecialOfferBySpecialOfferId);
            mock.SpecialOfferId = mockSpecialOfferBySpecialOfferId.SpecialOfferId;

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

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


            return((SpecialOfferProduct)mock);
        }
        ///<summary>
        ///  Update the Typed ProductVendor Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductVendor mock)
        {
            mock.AverageLeadTime = TestUtility.Instance.RandomNumber();
            mock.StandardPrice   = TestUtility.Instance.RandomShort();
            mock.LastReceiptCost = TestUtility.Instance.RandomShort();
            mock.LastReceiptDate = TestUtility.Instance.RandomDateTime();
            mock.MinOrderQty     = TestUtility.Instance.RandomNumber();
            mock.MaxOrderQty     = TestUtility.Instance.RandomNumber();
            mock.OnOrderQty      = TestUtility.Instance.RandomNumber();
            mock.ModifiedDate    = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

            //OneToOneRelationship
            UnitMeasure mockUnitMeasureByUnitMeasureCode = UnitMeasureTest.CreateMockInstance(tm);

            DataRepository.UnitMeasureProvider.Insert(tm, mockUnitMeasureByUnitMeasureCode);
            mock.UnitMeasureCode = mockUnitMeasureByUnitMeasureCode.UnitMeasureCode;

            //OneToOneRelationship
            Vendor mockVendorByVendorId = VendorTest.CreateMockInstance(tm);

            DataRepository.VendorProvider.Insert(tm, mockVendorByVendorId);
            mock.VendorId = mockVendorByVendorId.VendorId;
        }
Пример #4
0
        ///<summary>
        ///  Returns a Typed BillOfMaterials Entity with mock values.
        ///</summary>
        static public BillOfMaterials CreateMockInstance_Generated(TransactionManager tm)
        {
            BillOfMaterials mock = new BillOfMaterials();

            mock.StartDate      = TestUtility.Instance.RandomDateTime();
            mock.EndDate        = TestUtility.Instance.RandomDateTime();
            mock.BomLevel       = TestUtility.Instance.RandomShort();
            mock.PerAssemblyQty = (decimal)TestUtility.Instance.RandomShort();
            mock.ModifiedDate   = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByComponentId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByComponentId);
            mock.ComponentId = mockProductByComponentId.ProductId;
            //OneToOneRelationship
            Product mockProductByProductAssemblyId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductAssemblyId);
            mock.ProductAssemblyId = mockProductByProductAssemblyId.ProductId;
            //OneToOneRelationship
            UnitMeasure mockUnitMeasureByUnitMeasureCode = UnitMeasureTest.CreateMockInstance(tm);

            DataRepository.UnitMeasureProvider.Insert(tm, mockUnitMeasureByUnitMeasureCode);
            mock.UnitMeasureCode = mockUnitMeasureByUnitMeasureCode.UnitMeasureCode;

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

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


            return((BillOfMaterials)mock);
        }
Пример #5
0
        ///<summary>
        ///  Update the Typed BillOfMaterials Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, BillOfMaterials mock)
        {
            mock.StartDate      = TestUtility.Instance.RandomDateTime();
            mock.EndDate        = TestUtility.Instance.RandomDateTime();
            mock.BomLevel       = TestUtility.Instance.RandomShort();
            mock.PerAssemblyQty = (decimal)TestUtility.Instance.RandomShort();
            mock.ModifiedDate   = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByComponentId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByComponentId);
            mock.ComponentId = mockProductByComponentId.ProductId;

            //OneToOneRelationship
            Product mockProductByProductAssemblyId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductAssemblyId);
            mock.ProductAssemblyId = mockProductByProductAssemblyId.ProductId;

            //OneToOneRelationship
            UnitMeasure mockUnitMeasureByUnitMeasureCode = UnitMeasureTest.CreateMockInstance(tm);

            DataRepository.UnitMeasureProvider.Insert(tm, mockUnitMeasureByUnitMeasureCode);
            mock.UnitMeasureCode = mockUnitMeasureByUnitMeasureCode.UnitMeasureCode;
        }
Пример #6
0
        ///<summary>
        ///  Returns a Typed ProductReview Entity with mock values.
        ///</summary>
        static public ProductReview CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductReview mock = new ProductReview();

            mock.ReviewerName = TestUtility.Instance.RandomString(24, false);;
            mock.ReviewDate   = TestUtility.Instance.RandomDateTime();
            mock.EmailAddress = TestUtility.Instance.RandomString(24, false);;
            mock.Rating       = TestUtility.Instance.RandomNumber();
            mock.Comments     = TestUtility.Instance.RandomString(499, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((ProductReview)mock);
        }
        ///<summary>
        ///  Returns a Typed ProductDocument Entity with mock values.
        ///</summary>
        static public ProductDocument CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductDocument mock = new ProductDocument();

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

            //OneToOneRelationship
            Document mockDocumentByDocumentId = DocumentTest.CreateMockInstance(tm);

            DataRepository.DocumentProvider.Insert(tm, mockDocumentByDocumentId);
            mock.DocumentId = mockDocumentByDocumentId.DocumentId;
            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((ProductDocument)mock);
        }
        ///<summary>
        ///  Returns a Typed ProductInventory Entity with mock values.
        ///</summary>
        static public ProductInventory CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductInventory mock = new ProductInventory();

            mock.Shelf        = TestUtility.Instance.RandomString(10, false);;
            mock.Bin          = TestUtility.Instance.RandomByte();
            mock.Quantity     = TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Location mockLocationByLocationId = LocationTest.CreateMockInstance(tm);

            DataRepository.LocationProvider.Insert(tm, mockLocationByLocationId);
            mock.LocationId = mockLocationByLocationId.LocationId;
            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((ProductInventory)mock);
        }
Пример #9
0
        ///<summary>
        ///  Returns a Typed PurchaseOrderDetail Entity with mock values.
        ///</summary>
        static public PurchaseOrderDetail CreateMockInstance_Generated(TransactionManager tm)
        {
            PurchaseOrderDetail mock = new PurchaseOrderDetail();

            mock.DueDate      = TestUtility.Instance.RandomDateTime();
            mock.OrderQty     = TestUtility.Instance.RandomShort();
            mock.UnitPrice    = TestUtility.Instance.RandomShort();
            mock.ReceivedQty  = (decimal)TestUtility.Instance.RandomShort();
            mock.RejectedQty  = (decimal)TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
            //OneToOneRelationship
            PurchaseOrderHeader mockPurchaseOrderHeaderByPurchaseOrderId = PurchaseOrderHeaderTest.CreateMockInstance(tm);

            DataRepository.PurchaseOrderHeaderProvider.Insert(tm, mockPurchaseOrderHeaderByPurchaseOrderId);
            mock.PurchaseOrderId = mockPurchaseOrderHeaderByPurchaseOrderId.PurchaseOrderId;

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

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


            return((PurchaseOrderDetail)mock);
        }
        ///<summary>
        ///  Returns a Typed ProductProductPhoto Entity with mock values.
        ///</summary>
        static public ProductProductPhoto CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductProductPhoto mock = new ProductProductPhoto();

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

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
            //OneToOneRelationship
            ProductPhoto mockProductPhotoByProductPhotoId = ProductPhotoTest.CreateMockInstance(tm);

            DataRepository.ProductPhotoProvider.Insert(tm, mockProductPhotoByProductPhotoId);
            mock.ProductPhotoId = mockProductPhotoByProductPhotoId.ProductPhotoId;

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

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


            return((ProductProductPhoto)mock);
        }
Пример #11
0
        ///<summary>
        ///  Update the Typed Product Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance(TransactionManager tm, Product mock)
        {
            ProductTest.UpdateMockInstance_Generated(tm, mock);

            // make any alterations necessary
            // (i.e. for DB check constraints, special test cases, etc.)
            SetSpecialTestData(mock);
        }
        ///<summary>
        ///  Update the Typed ProductCostHistory Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductCostHistory mock)
        {
            mock.EndDate      = TestUtility.Instance.RandomDateTime();
            mock.StandardCost = TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
Пример #13
0
        ///<summary>
        ///  Returns a Typed Product Entity with mock values.
        ///</summary>
        static public Product CreateMockInstance(TransactionManager tm)
        {
            // get the default mock instance
            Product mock = ProductTest.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 ShoppingCartItem Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ShoppingCartItem mock)
        {
            mock.ShoppingCartId = TestUtility.Instance.RandomString(24, false);;
            mock.Quantity       = TestUtility.Instance.RandomNumber();
            mock.DateCreated    = TestUtility.Instance.RandomDateTime();
            mock.ModifiedDate   = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
Пример #15
0
        ///<summary>
        ///  Update the Typed ProductReview Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductReview mock)
        {
            mock.ReviewerName = TestUtility.Instance.RandomString(24, false);;
            mock.ReviewDate   = TestUtility.Instance.RandomDateTime();
            mock.EmailAddress = TestUtility.Instance.RandomString(24, false);;
            mock.Rating       = TestUtility.Instance.RandomNumber();
            mock.Comments     = TestUtility.Instance.RandomString(499, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
        ///<summary>
        ///  Update the Typed ProductDocument Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductDocument mock)
        {
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Document mockDocumentByDocumentId = DocumentTest.CreateMockInstance(tm);

            DataRepository.DocumentProvider.Insert(tm, mockDocumentByDocumentId);
            mock.DocumentId = mockDocumentByDocumentId.DocumentId;

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
Пример #17
0
        ///<summary>
        ///  Update the Typed SpecialOfferProduct Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, SpecialOfferProduct mock)
        {
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

            //OneToOneRelationship
            SpecialOffer mockSpecialOfferBySpecialOfferId = SpecialOfferTest.CreateMockInstance(tm);

            DataRepository.SpecialOfferProvider.Insert(tm, mockSpecialOfferBySpecialOfferId);
            mock.SpecialOfferId = mockSpecialOfferBySpecialOfferId.SpecialOfferId;
        }
        ///<summary>
        ///  Update the Typed TransactionHistory Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, TransactionHistory mock)
        {
            mock.ReferenceOrderId     = TestUtility.Instance.RandomNumber();
            mock.ReferenceOrderLineId = TestUtility.Instance.RandomNumber();
            mock.TransactionDate      = TestUtility.Instance.RandomDateTime();
            mock.TransactionType      = TestUtility.Instance.RandomString(1, false);;
            mock.Quantity             = TestUtility.Instance.RandomNumber();
            mock.ActualCost           = TestUtility.Instance.RandomShort();
            mock.ModifiedDate         = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
        ///<summary>
        ///  Update the Typed ProductProductPhoto Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductProductPhoto mock)
        {
            mock.Primary      = TestUtility.Instance.RandomBoolean();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

            //OneToOneRelationship
            ProductPhoto mockProductPhotoByProductPhotoId = ProductPhotoTest.CreateMockInstance(tm);

            DataRepository.ProductPhotoProvider.Insert(tm, mockProductPhotoByProductPhotoId);
            mock.ProductPhotoId = mockProductPhotoByProductPhotoId.ProductPhotoId;
        }
        ///<summary>
        ///  Update the Typed ProductInventory Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, ProductInventory mock)
        {
            mock.Shelf        = TestUtility.Instance.RandomString(10, false);;
            mock.Bin          = TestUtility.Instance.RandomByte();
            mock.Quantity     = TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Location mockLocationByLocationId = LocationTest.CreateMockInstance(tm);

            DataRepository.LocationProvider.Insert(tm, mockLocationByLocationId);
            mock.LocationId = mockLocationByLocationId.LocationId;

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
        }
Пример #21
0
        ///<summary>
        ///  Update the Typed PurchaseOrderDetail Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, PurchaseOrderDetail mock)
        {
            mock.DueDate      = TestUtility.Instance.RandomDateTime();
            mock.OrderQty     = TestUtility.Instance.RandomShort();
            mock.UnitPrice    = TestUtility.Instance.RandomShort();
            mock.ReceivedQty  = (decimal)TestUtility.Instance.RandomShort();
            mock.RejectedQty  = (decimal)TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

            //OneToOneRelationship
            PurchaseOrderHeader mockPurchaseOrderHeaderByPurchaseOrderId = PurchaseOrderHeaderTest.CreateMockInstance(tm);

            DataRepository.PurchaseOrderHeaderProvider.Insert(tm, mockPurchaseOrderHeaderByPurchaseOrderId);
            mock.PurchaseOrderId = mockPurchaseOrderHeaderByPurchaseOrderId.PurchaseOrderId;
        }
        ///<summary>
        ///  Returns a Typed ProductVendor Entity with mock values.
        ///</summary>
        static public ProductVendor CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductVendor mock = new ProductVendor();

            mock.AverageLeadTime = TestUtility.Instance.RandomNumber();
            mock.StandardPrice   = TestUtility.Instance.RandomShort();
            mock.LastReceiptCost = TestUtility.Instance.RandomShort();
            mock.LastReceiptDate = TestUtility.Instance.RandomDateTime();
            mock.MinOrderQty     = TestUtility.Instance.RandomNumber();
            mock.MaxOrderQty     = TestUtility.Instance.RandomNumber();
            mock.OnOrderQty      = TestUtility.Instance.RandomNumber();
            mock.ModifiedDate    = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;
            //OneToOneRelationship
            UnitMeasure mockUnitMeasureByUnitMeasureCode = UnitMeasureTest.CreateMockInstance(tm);

            DataRepository.UnitMeasureProvider.Insert(tm, mockUnitMeasureByUnitMeasureCode);
            mock.UnitMeasureCode = mockUnitMeasureByUnitMeasureCode.UnitMeasureCode;
            //OneToOneRelationship
            Vendor mockVendorByVendorId = VendorTest.CreateMockInstance(tm);

            DataRepository.VendorProvider.Insert(tm, mockVendorByVendorId);
            mock.VendorId = mockVendorByVendorId.VendorId;

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

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


            return((ProductVendor)mock);
        }
        ///<summary>
        ///  Returns a Typed ProductCostHistory Entity with mock values.
        ///</summary>
        static public ProductCostHistory CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductCostHistory mock = new ProductCostHistory();

            mock.StartDate    = TestUtility.Instance.RandomDateTime();
            mock.EndDate      = TestUtility.Instance.RandomDateTime();
            mock.StandardCost = TestUtility.Instance.RandomShort();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((ProductCostHistory)mock);
        }
        ///<summary>
        ///  Returns a Typed ShoppingCartItem Entity with mock values.
        ///</summary>
        static public ShoppingCartItem CreateMockInstance_Generated(TransactionManager tm)
        {
            ShoppingCartItem mock = new ShoppingCartItem();

            mock.ShoppingCartId = TestUtility.Instance.RandomString(24, false);;
            mock.Quantity       = TestUtility.Instance.RandomNumber();
            mock.DateCreated    = TestUtility.Instance.RandomDateTime();
            mock.ModifiedDate   = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Product mockProductByProductId = ProductTest.CreateMockInstance(tm);

            DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
            mock.ProductId = mockProductByProductId.ProductId;

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

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


            return((ShoppingCartItem)mock);
        }