예제 #1
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 StateProvince Entity with mock values.
        ///</summary>
        static public StateProvince CreateMockInstance_Generated(TransactionManager tm)
        {
            StateProvince mock = new StateProvince();

            mock.StateProvinceCode       = TestUtility.Instance.RandomString(3, false);;
            mock.IsOnlyStateProvinceFlag = TestUtility.Instance.RandomBoolean();
            mock.Name         = TestUtility.Instance.RandomString(24, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            int count0 = 0;
            TList <CountryRegion> _collection0 = DataRepository.CountryRegionProvider.GetPaged(tm, 0, 10, out count0);

            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.CountryRegionCode = _collection0[0].CountryRegionCode;
            }
            int count1 = 0;
            TList <SalesTerritory> _collection1 = DataRepository.SalesTerritoryProvider.GetPaged(tm, 0, 10, out count1);

            //_collection1.Shuffle();
            if (_collection1.Count > 0)
            {
                mock.TerritoryId = _collection1[0].TerritoryId;
            }

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

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


            return((StateProvince)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);
        }
예제 #4
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);
        }
예제 #5
0
        ///<summary>
        ///  Returns a Typed BookAttr Entity with mock values.
        ///</summary>
        static public BookAttr CreateMockInstance_Generated(TransactionManager tm)
        {
            BookAttr mock = new BookAttr();

            mock.GoodsId    = TestUtility.Instance.RandomString(6, false);;
            mock.Author     = TestUtility.Instance.RandomString(99, false);;
            mock.Publish    = TestUtility.Instance.RandomString(99, false);;
            mock.Translator = TestUtility.Instance.RandomString(99, false);;
            mock.FormType   = TestUtility.Instance.RandomNumber();
            mock.Language   = TestUtility.Instance.RandomNumber();
            mock.PlMonth    = TestUtility.Instance.RandomNumber();
            mock.PlYear     = TestUtility.Instance.RandomNumber();
            mock.Dimension  = TestUtility.Instance.RandomString(49, false);;
            mock.Weight     = TestUtility.Instance.RandomNumber();
            mock.Pages      = TestUtility.Instance.RandomNumber();
            mock.Introinfo  = TestUtility.Instance.RandomString(499, false);;


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

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


            return((BookAttr)mock);
        }
예제 #6
0
        ///<summary>
        ///  Returns a Typed WorkOrderRouting Entity with mock values.
        ///</summary>
        static public WorkOrderRouting CreateMockInstance_Generated(TransactionManager tm)
        {
            WorkOrderRouting mock = new WorkOrderRouting();

            mock.ProductId          = TestUtility.Instance.RandomNumber();
            mock.OperationSequence  = TestUtility.Instance.RandomShort();
            mock.ScheduledStartDate = TestUtility.Instance.RandomDateTime();
            mock.ScheduledEndDate   = TestUtility.Instance.RandomDateTime();
            mock.ActualStartDate    = TestUtility.Instance.RandomDateTime();
            mock.ActualEndDate      = TestUtility.Instance.RandomDateTime();
            mock.ActualResourceHrs  = (decimal)TestUtility.Instance.RandomShort();
            mock.PlannedCost        = TestUtility.Instance.RandomShort();
            mock.ActualCost         = TestUtility.Instance.RandomShort();
            mock.ModifiedDate       = TestUtility.Instance.RandomDateTime();

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

            DataRepository.LocationProvider.Insert(tm, mockLocationByLocationId);
            mock.LocationId = mockLocationByLocationId.LocationId;
            //OneToOneRelationship
            WorkOrder mockWorkOrderByWorkOrderId = WorkOrderTest.CreateMockInstance(tm);

            DataRepository.WorkOrderProvider.Insert(tm, mockWorkOrderByWorkOrderId);
            mock.WorkOrderId = mockWorkOrderByWorkOrderId.WorkOrderId;

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

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


            return((WorkOrderRouting)mock);
        }
예제 #7
0
        ///<summary>
        ///  Returns a Typed Staff Entity with mock values.
        ///</summary>
        static public Staff CreateMockInstance_Generated(TransactionManager tm)
        {
            Staff mock = new Staff();

            mock.Id            = TestUtility.Instance.RandomString(7, false);;
            mock.Name          = TestUtility.Instance.RandomString(24, false);;
            mock.Depart        = TestUtility.Instance.RandomString(2, false);;
            mock.OpenDate      = TestUtility.Instance.RandomDateTime();
            mock.SalaryLevel   = (decimal)TestUtility.Instance.RandomShort();
            mock.Address       = TestUtility.Instance.RandomString(99, false);;
            mock.Phone         = TestUtility.Instance.RandomString(14, false);;
            mock.PersonId      = TestUtility.Instance.RandomString(10, false);;
            mock.PersonIddate  = TestUtility.Instance.RandomDateTime();
            mock.Location      = TestUtility.Instance.RandomString(24, false);;
            mock.ContactPerson = TestUtility.Instance.RandomString(49, false);;
            mock.Remark        = TestUtility.Instance.RandomString(99, false);;
            mock.Labelsprn     = TestUtility.Instance.RandomString(6, false);;
            mock.Status        = TestUtility.Instance.RandomNumber();


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

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


            return((Staff)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 SalesPerson Entity with mock values.
        ///</summary>
        static public SalesPerson CreateMockInstance_Generated(TransactionManager tm)
        {
            SalesPerson mock = new SalesPerson();

            mock.SalesQuota    = TestUtility.Instance.RandomShort();
            mock.Bonus         = TestUtility.Instance.RandomShort();
            mock.CommissionPct = TestUtility.Instance.RandomShort();
            mock.SalesYtd      = TestUtility.Instance.RandomShort();
            mock.SalesLastYear = TestUtility.Instance.RandomShort();
            mock.ModifiedDate  = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Employee mockEmployeeBySalesPersonId = EmployeeTest.CreateMockInstance(tm);

            DataRepository.EmployeeProvider.Insert(tm, mockEmployeeBySalesPersonId);
            mock.SalesPersonId = mockEmployeeBySalesPersonId.EmployeeId;
            int count1 = 0;
            TList <SalesTerritory> _collection1 = DataRepository.SalesTerritoryProvider.GetPaged(tm, 0, 10, out count1);

            //_collection1.Shuffle();
            if (_collection1.Count > 0)
            {
                mock.TerritoryId = _collection1[0].TerritoryId;
            }

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

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


            return((SalesPerson)mock);
        }
예제 #10
0
        ///<summary>
        ///  Returns a Typed VendorAddress Entity with mock values.
        ///</summary>
        static public VendorAddress CreateMockInstance_Generated(TransactionManager tm)
        {
            VendorAddress mock = new VendorAddress();

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

            //OneToOneRelationship
            Address mockAddressByAddressId = AddressTest.CreateMockInstance(tm);

            DataRepository.AddressProvider.Insert(tm, mockAddressByAddressId);
            mock.AddressId = mockAddressByAddressId.AddressId;
            //OneToOneRelationship
            AddressType mockAddressTypeByAddressTypeId = AddressTypeTest.CreateMockInstance(tm);

            DataRepository.AddressTypeProvider.Insert(tm, mockAddressTypeByAddressTypeId);
            mock.AddressTypeId = mockAddressTypeByAddressTypeId.AddressTypeId;
            //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 <VendorAddress> tempMockCollection = new TList <VendorAddress>();

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


            return((VendorAddress)mock);
        }
예제 #11
0
        ///<summary>
        ///  Returns a Typed ProductSubcategory Entity with mock values.
        ///</summary>
        static public ProductSubcategory CreateMockInstance_Generated(TransactionManager tm)
        {
            ProductSubcategory mock = new ProductSubcategory();

            mock.Name         = TestUtility.Instance.RandomString(24, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            int count0 = 0;
            TList <ProductCategory> _collection0 = DataRepository.ProductCategoryProvider.GetPaged(tm, 0, 10, out count0);

            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.ProductCategoryId = _collection0[0].ProductCategoryId;
            }

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

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


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

            mock.Id        = TestUtility.Instance.RandomString(5, false);;
            mock.GoodsId   = TestUtility.Instance.RandomString(6, false);;
            mock.OpenDate  = TestUtility.Instance.RandomDateTime();
            mock.LastDate  = TestUtility.Instance.RandomDateTime();
            mock.MinusDate = TestUtility.Instance.RandomDateTime();
            mock.StktakeDt = TestUtility.Instance.RandomDateTime();
            mock.StktakeTm = TestUtility.Instance.RandomString(10, false);;
            mock.BeginQty  = (decimal)TestUtility.Instance.RandomShort();
            mock.ExpQty    = (decimal)TestUtility.Instance.RandomShort();
            mock.ImpQty    = (decimal)TestUtility.Instance.RandomShort();
            mock.BeginAmt  = (decimal)TestUtility.Instance.RandomShort();
            mock.ExpAmt    = (decimal)TestUtility.Instance.RandomShort();
            mock.ImpAmt    = (decimal)TestUtility.Instance.RandomShort();
            mock.Averimppr = (decimal)TestUtility.Instance.RandomShort();


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

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


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

            mock.TransNum  = TestUtility.Instance.RandomString(5, false);;
            mock.TranDate  = TestUtility.Instance.RandomDateTime();
            mock.TransCode = TestUtility.Instance.RandomString(2, false);;
            mock.TranTime  = TestUtility.Instance.RandomString(5, false);;
            mock.ExpId     = TestUtility.Instance.RandomString(5, false);;
            mock.CsId      = TestUtility.Instance.RandomString(8, false);;
            mock.GoodsId   = TestUtility.Instance.RandomString(6, false);;
            mock.Qty       = (decimal)TestUtility.Instance.RandomShort();
            mock.DueDate   = TestUtility.Instance.RandomDateTime();
            mock.UserId    = (decimal)TestUtility.Instance.RandomShort();
            mock.CorrTran  = TestUtility.Instance.RandomString(5, false);;
            mock.Remark    = TestUtility.Instance.RandomString(149, false);;
            mock.Status    = TestUtility.Instance.RandomBoolean();


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

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


            return((LoanTran)mock);
        }
예제 #14
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 PaymentOrder Entity with mock values.
        ///</summary>
        static public PaymentOrder CreateMockInstance_Generated(TransactionManager tm)
        {
            PaymentOrder mock = new PaymentOrder();

            mock.TransNum    = TestUtility.Instance.RandomString(5, false);;
            mock.Payer       = TestUtility.Instance.RandomString(99, false);;
            mock.PayerAcc    = TestUtility.Instance.RandomString(9, false);;
            mock.PayerBank   = TestUtility.Instance.RandomString(99, false);;
            mock.PayerBranch = TestUtility.Instance.RandomString(126, false);;
            mock.Benef       = TestUtility.Instance.RandomString(99, false);;
            mock.BenefAcc    = TestUtility.Instance.RandomString(9, false);;
            mock.BenefBank   = TestUtility.Instance.RandomString(99, false);;
            mock.BenefBranch = TestUtility.Instance.RandomString(99, false);;
            mock.Amount      = (decimal)TestUtility.Instance.RandomShort();


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

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


            return((PaymentOrder)mock);
        }
예제 #16
0
        ///<summary>
        ///  Returns a Typed Store Entity with mock values.
        ///</summary>
        static public Store CreateMockInstance_Generated(TransactionManager tm)
        {
            Store mock = new Store();

            mock.Name         = TestUtility.Instance.RandomString(24, false);;
            mock.Demographics = "<test></test>";
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Customer mockCustomerByCustomerId = CustomerTest.CreateMockInstance(tm);

            DataRepository.CustomerProvider.Insert(tm, mockCustomerByCustomerId);
            mock.CustomerId = mockCustomerByCustomerId.CustomerId;
            int count1 = 0;
            TList <SalesPerson> _collection1 = DataRepository.SalesPersonProvider.GetPaged(tm, 0, 10, out count1);

            //_collection1.Shuffle();
            if (_collection1.Count > 0)
            {
                mock.SalesPersonId = _collection1[0].SalesPersonId;
            }

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

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


            return((Store)mock);
        }
예제 #17
0
        ///<summary>
        ///  Returns a Typed Account Entity with mock values.
        ///</summary>
        static public Account CreateMockInstance_Generated(TransactionManager tm)
        {
            Account mock = new Account();

            mock.Branch    = (decimal)TestUtility.Instance.RandomShort();
            mock.AccountId = TestUtility.Instance.RandomString(9, false);;
            mock.Abbreviat = TestUtility.Instance.RandomString(14, false);;
            mock.MofGl     = TestUtility.Instance.RandomString(4, false);;
            mock.CustId    = TestUtility.Instance.RandomString(5, false);;
            mock.Name      = TestUtility.Instance.RandomString(99, false);;
            mock.OpenDate  = TestUtility.Instance.RandomDateTime();
            mock.PrevDate  = TestUtility.Instance.RandomDateTime();
            mock.LastDate  = TestUtility.Instance.RandomDateTime();
            mock.Creamt    = (decimal)TestUtility.Instance.RandomShort();
            mock.Debamt    = (decimal)TestUtility.Instance.RandomShort();
            mock.Status    = TestUtility.Instance.RandomBoolean();


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

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


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

            mock.Id          = TestUtility.Instance.RandomNumber();
            mock.Name        = TestUtility.Instance.RandomString(9, false);;
            mock.Description = TestUtility.Instance.RandomString(49, false);;
            mock.Login       = TestUtility.Instance.RandomNumber();
            mock.UserId      = TestUtility.Instance.RandomNumber();
            mock.PosId       = TestUtility.Instance.RandomString(5, false);;
            mock.Prnport     = TestUtility.Instance.RandomNumber();
            mock.Ipaddress   = TestUtility.Instance.RandomString(49, false);;
            mock.Message     = TestUtility.Instance.RandomBoolean();
            mock.Serialkey   = TestUtility.Instance.RandomString(24, false);;
            mock.Status      = TestUtility.Instance.RandomBoolean();


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

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


            return((Stations)mock);
        }
        ///<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);
        }
예제 #20
0
        ///<summary>
        ///  Returns a Typed AtrCode Entity with mock values.
        ///</summary>
        static public AtrCode CreateMockInstance_Generated(TransactionManager tm)
        {
            AtrCode mock = new AtrCode();

            mock.TransCode = TestUtility.Instance.RandomString(2, false);;
            mock.TransName = TestUtility.Instance.RandomString(99, false);;
            mock.Status    = TestUtility.Instance.RandomBoolean();
            mock.DbAccid   = TestUtility.Instance.RandomString(9, false);;
            mock.CrAccid   = TestUtility.Instance.RandomString(9, false);;
            mock.Accid1    = TestUtility.Instance.RandomString(9, false);;
            mock.Accid2    = TestUtility.Instance.RandomString(9, false);;
            mock.Accid3    = TestUtility.Instance.RandomString(9, false);;
            mock.Pcommand  = TestUtility.Instance.RandomString(49, false);;
            mock.Form      = TestUtility.Instance.RandomString(9, false);;
            mock.Voucher   = TestUtility.Instance.RandomString(9, false);;
            mock.Fvoucher  = TestUtility.Instance.RandomString(9, false);;
            mock.Nov       = (decimal)TestUtility.Instance.RandomShort();
            mock.TrType    = TestUtility.Instance.RandomString(2, false);;


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

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


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

            mock.AddressLine1 = TestUtility.Instance.RandomString(29, false);;
            mock.AddressLine2 = TestUtility.Instance.RandomString(29, false);;
            mock.City         = TestUtility.Instance.RandomString(14, false);;
            mock.PostalCode   = TestUtility.Instance.RandomString(6, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            int count0 = 0;
            TList <StateProvince> _collection0 = DataRepository.StateProvinceProvider.GetPaged(tm, 0, 10, out count0);

            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.StateProvinceId = _collection0[0].StateProvinceId;
            }

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

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


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

            mock.CarrierTrackingNumber = TestUtility.Instance.RandomString(11, false);;
            mock.OrderQty          = TestUtility.Instance.RandomShort();
            mock.UnitPrice         = TestUtility.Instance.RandomShort();
            mock.UnitPriceDiscount = TestUtility.Instance.RandomShort();
            mock.ModifiedDate      = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            SalesOrderHeader mockSalesOrderHeaderBySalesOrderId = SalesOrderHeaderTest.CreateMockInstance(tm);

            DataRepository.SalesOrderHeaderProvider.Insert(tm, mockSalesOrderHeaderBySalesOrderId);
            mock.SalesOrderId = mockSalesOrderHeaderBySalesOrderId.SalesOrderId;
            //OneToOneRelationship
            SpecialOfferProduct mockSpecialOfferProductBySpecialOfferIdProductId = SpecialOfferProductTest.CreateMockInstance(tm);

            DataRepository.SpecialOfferProductProvider.Insert(tm, mockSpecialOfferProductBySpecialOfferIdProductId);
            mock.SpecialOfferId = mockSpecialOfferProductBySpecialOfferIdProductId.SpecialOfferId;
            mock.ProductId      = mockSpecialOfferProductBySpecialOfferIdProductId.ProductId;

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

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


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

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

            //OneToOneRelationship
            CountryRegion mockCountryRegionByCountryRegionCode = CountryRegionTest.CreateMockInstance(tm);

            DataRepository.CountryRegionProvider.Insert(tm, mockCountryRegionByCountryRegionCode);
            mock.CountryRegionCode = mockCountryRegionByCountryRegionCode.CountryRegionCode;
            //OneToOneRelationship
            Currency mockCurrencyByCurrencyCode = CurrencyTest.CreateMockInstance(tm);

            DataRepository.CurrencyProvider.Insert(tm, mockCurrencyByCurrencyCode);
            mock.CurrencyCode = mockCurrencyByCurrencyCode.CurrencyCode;

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

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


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

            mock.Demographics = "<test></test>";
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            Contact mockContactByContactId = ContactTest.CreateMockInstance(tm);

            DataRepository.ContactProvider.Insert(tm, mockContactByContactId);
            mock.ContactId = mockContactByContactId.ContactId;
            //OneToOneRelationship
            Customer mockCustomerByCustomerId = CustomerTest.CreateMockInstance(tm);

            DataRepository.CustomerProvider.Insert(tm, mockCustomerByCustomerId);
            mock.CustomerId = mockCustomerByCustomerId.CustomerId;

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

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


            return((Individual)mock);
        }
예제 #25
0
        ///<summary>
        ///  Returns a Typed SalesOrderHeaderSalesReason Entity with mock values.
        ///</summary>
        static public SalesOrderHeaderSalesReason CreateMockInstance_Generated(TransactionManager tm)
        {
            SalesOrderHeaderSalesReason mock = new SalesOrderHeaderSalesReason();

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

            //OneToOneRelationship
            SalesOrderHeader mockSalesOrderHeaderBySalesOrderId = SalesOrderHeaderTest.CreateMockInstance(tm);

            DataRepository.SalesOrderHeaderProvider.Insert(tm, mockSalesOrderHeaderBySalesOrderId);
            mock.SalesOrderId = mockSalesOrderHeaderBySalesOrderId.SalesOrderId;
            //OneToOneRelationship
            SalesReason mockSalesReasonBySalesReasonId = SalesReasonTest.CreateMockInstance(tm);

            DataRepository.SalesReasonProvider.Insert(tm, mockSalesReasonBySalesReasonId);
            mock.SalesReasonId = mockSalesReasonBySalesReasonId.SalesReasonId;

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

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


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

            mock.CustomerType = TestUtility.Instance.RandomString(1, false);;
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            int count0 = 0;
            TList <SalesTerritory> _collection0 = DataRepository.SalesTerritoryProvider.GetPaged(tm, 0, 10, out count0);

            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.TerritoryId = _collection0[0].TerritoryId;
            }

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

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


            return((Customer)mock);
        }
예제 #27
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);
        }
        ///<summary>
        ///  Returns a Typed Customer Entity with mock values.
        ///</summary>
        static public Customer CreateMockInstance_Generated(TransactionManager tm)
        {
            Customer mock = new Customer();

            mock.Id         = TestUtility.Instance.RandomString(8, false);;
            mock.Type       = TestUtility.Instance.RandomNumber();
            mock.Fullname   = TestUtility.Instance.RandomString(99, false);;
            mock.Address    = TestUtility.Instance.RandomString(249, false);;
            mock.Phone      = TestUtility.Instance.RandomString(49, false);;
            mock.Fax        = TestUtility.Instance.RandomString(24, false);;
            mock.PersonId   = TestUtility.Instance.RandomString(14, false);;
            mock.PlaceIssue = TestUtility.Instance.RandomString(74, false);;
            mock.Email      = TestUtility.Instance.RandomString(49, false);;
            mock.DueDate    = TestUtility.Instance.RandomDateTime();
            mock.Image      = new byte[] { TestUtility.Instance.RandomByte() };
            mock.Bankname   = TestUtility.Instance.RandomString(74, false);;
            mock.BankBr     = TestUtility.Instance.RandomString(74, false);;
            mock.Accnum     = TestUtility.Instance.RandomString(24, false);;
            mock.Vatnum     = TestUtility.Instance.RandomString(24, false);;
            mock.Contactps  = TestUtility.Instance.RandomString(24, false);;
            mock.Remark     = TestUtility.Instance.RandomString(249, false);;
            mock.OpenDate   = TestUtility.Instance.RandomDateTime();
            mock.Status     = TestUtility.Instance.RandomBoolean();


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

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


            return((Customer)mock);
        }
예제 #29
0
        ///<summary>
        ///  Returns a Typed Contact Entity with mock values.
        ///</summary>
        static public Contact CreateMockInstance_Generated(TransactionManager tm)
        {
            Contact mock = new Contact();

            mock.NameStyle             = TestUtility.Instance.RandomBoolean();
            mock.Title                 = TestUtility.Instance.RandomString(8, false);;
            mock.FirstName             = TestUtility.Instance.RandomString(24, false);;
            mock.MiddleName            = TestUtility.Instance.RandomString(24, false);;
            mock.LastName              = TestUtility.Instance.RandomString(24, false);;
            mock.Suffix                = TestUtility.Instance.RandomString(10, false);;
            mock.EmailAddress          = TestUtility.Instance.RandomString(24, false);;
            mock.EmailPromotion        = TestUtility.Instance.RandomNumber();
            mock.Phone                 = TestUtility.Instance.RandomString(11, false);;
            mock.PasswordHash          = TestUtility.Instance.RandomString(63, false);;
            mock.PasswordSalt          = TestUtility.Instance.RandomString(10, false);;
            mock.AdditionalContactInfo = "<test></test>";
            mock.ModifiedDate          = TestUtility.Instance.RandomDateTime();


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

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


            return((Contact)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);
        }
예제 #31
0
        ///<summary>
        ///  Returns a Typed Region Entity with mock values.
        ///</summary>
        public static Region CreateMockInstance_Generated(TransactionManager tm)
        {
            Region mock = new Region();

            mock.RegionId = TestUtility.Instance.RandomNumber();
            mock.RegionDescription = TestUtility.Instance.RandomString(24, false);;

            // create a temporary collection and add the item to it
            TList<Region> tempMockCollection = new TList<Region>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (Region)mock;
        }
예제 #32
0
        ///<summary>
        ///  Returns a Typed Categories Entity with mock values.
        ///</summary>
        public static Categories CreateMockInstance_Generated(TransactionManager tm)
        {
            Categories mock = new Categories();

            mock.CategoryName = TestUtility.Instance.RandomString(6, false);;
            mock.Description = TestUtility.Instance.RandomString(2, false);;
            mock.Picture = new byte[] { TestUtility.Instance.RandomByte() };

            // create a temporary collection and add the item to it
            TList<Categories> tempMockCollection = new TList<Categories>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

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

            //OneToOneRelationship
            CustomerDemographics mockCustomerDemographicsByCustomerTypeId = CustomerDemographicsTest.CreateMockInstance(tm);
            DataRepository.CustomerDemographicsProvider.Insert(tm, mockCustomerDemographicsByCustomerTypeId);
            mock.CustomerTypeId = mockCustomerDemographicsByCustomerTypeId.CustomerTypeId;
            //OneToOneRelationship
            Customers mockCustomersByCustomerId = CustomersTest.CreateMockInstance(tm);
            DataRepository.CustomersProvider.Insert(tm, mockCustomersByCustomerId);
            mock.CustomerId = mockCustomersByCustomerId.CustomerId;

            // create a temporary collection and add the item to it
            TList<CustomerCustomerDemo> tempMockCollection = new TList<CustomerCustomerDemo>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (CustomerCustomerDemo)mock;
        }
예제 #34
0
        ///<summary>
        ///  Returns a Typed Territories Entity with mock values.
        ///</summary>
        public static Territories CreateMockInstance_Generated(TransactionManager tm)
        {
            Territories mock = new Territories();

            mock.TerritoryId = TestUtility.Instance.RandomString(9, false);;
            mock.TerritoryDescription = TestUtility.Instance.RandomString(24, false);;

            int count0 = 0;
            TList<Region> _collection0 = DataRepository.RegionProvider.GetPaged(tm, 0, 10, out count0);
            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.RegionId = _collection0[0].RegionId;

            }

            // create a temporary collection and add the item to it
            TList<Territories> tempMockCollection = new TList<Territories>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (Territories)mock;
        }
예제 #35
0
        ///<summary>
        ///  Returns a Typed Suppliers Entity with mock values.
        ///</summary>
        public static Suppliers CreateMockInstance_Generated(TransactionManager tm)
        {
            Suppliers mock = new Suppliers();

            mock.CompanyName = TestUtility.Instance.RandomString(19, false);;
            mock.ContactName = TestUtility.Instance.RandomString(14, false);;
            mock.ContactTitle = TestUtility.Instance.RandomString(14, false);;
            mock.Address = TestUtility.Instance.RandomString(29, false);;
            mock.City = TestUtility.Instance.RandomString(6, false);;
            mock.Region = TestUtility.Instance.RandomString(6, false);;
            mock.PostalCode = TestUtility.Instance.RandomString(10, false);;
            mock.Country = TestUtility.Instance.RandomString(6, false);;
            mock.Phone = TestUtility.Instance.RandomString(11, false);;
            mock.Fax = TestUtility.Instance.RandomString(11, false);;
            mock.HomePage = TestUtility.Instance.RandomString(2, false);;

            // create a temporary collection and add the item to it
            TList<Suppliers> tempMockCollection = new TList<Suppliers>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (Suppliers)mock;
        }
예제 #36
0
        ///<summary>
        ///  Returns a Typed Employees Entity with mock values.
        ///</summary>
        public static Employees CreateMockInstance_Generated(TransactionManager tm)
        {
            Employees mock = new Employees();

            mock.LastName = TestUtility.Instance.RandomString(9, false);;
            mock.FirstName = TestUtility.Instance.RandomString(10, false);;
            mock.Title = TestUtility.Instance.RandomString(14, false);;
            mock.TitleOfCourtesy = TestUtility.Instance.RandomString(11, false);;
            mock.BirthDate = TestUtility.Instance.RandomDateTime();
            mock.HireDate = TestUtility.Instance.RandomDateTime();
            mock.Address = TestUtility.Instance.RandomString(29, false);;
            mock.City = TestUtility.Instance.RandomString(6, false);;
            mock.Region = TestUtility.Instance.RandomString(6, false);;
            mock.PostalCode = TestUtility.Instance.RandomString(10, false);;
            mock.Country = TestUtility.Instance.RandomString(6, false);;
            mock.HomePhone = TestUtility.Instance.RandomString(11, false);;
            mock.Extension = TestUtility.Instance.RandomString(4, false);;
            mock.Photo = new byte[] { TestUtility.Instance.RandomByte() };
            mock.Notes = TestUtility.Instance.RandomString(2, false);;
            mock.PhotoPath = TestUtility.Instance.RandomString(126, false);;

            int count0 = 0;
            TList<Employees> _collection0 = DataRepository.EmployeesProvider.GetPaged(tm, 0, 10, out count0);
            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.ReportsTo = _collection0[0].EmployeeId;

            }

            // create a temporary collection and add the item to it
            TList<Employees> tempMockCollection = new TList<Employees>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (Employees)mock;
        }
예제 #37
0
        ///<summary>
        ///  Returns a Typed Products Entity with mock values.
        ///</summary>
        public static Products CreateMockInstance_Generated(TransactionManager tm)
        {
            Products mock = new Products();

            mock.ProductName = TestUtility.Instance.RandomString(19, false);;
            mock.QuantityPerUnit = TestUtility.Instance.RandomString(9, false);;
            mock.UnitPrice = TestUtility.Instance.RandomShort();
            mock.UnitsInStock = TestUtility.Instance.RandomShort();
            mock.UnitsOnOrder = TestUtility.Instance.RandomShort();
            mock.ReorderLevel = TestUtility.Instance.RandomShort();
            mock.Discontinued = TestUtility.Instance.RandomBoolean();

            int count0 = 0;
            TList<Categories> _collection0 = DataRepository.CategoriesProvider.GetPaged(tm, 0, 10, out count0);
            //_collection0.Shuffle();
            if (_collection0.Count > 0)
            {
                mock.CategoryId = _collection0[0].CategoryId;

            }
            int count1 = 0;
            TList<Suppliers> _collection1 = DataRepository.SuppliersProvider.GetPaged(tm, 0, 10, out count1);
            //_collection1.Shuffle();
            if (_collection1.Count > 0)
            {
                mock.SupplierId = _collection1[0].SupplierId;

            }

            // create a temporary collection and add the item to it
            TList<Products> tempMockCollection = new TList<Products>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (Products)mock;
        }
예제 #38
0
        ///<summary>
        ///  Returns a Typed OrderDetails Entity with mock values.
        ///</summary>
        public static OrderDetails CreateMockInstance_Generated(TransactionManager tm)
        {
            OrderDetails mock = new OrderDetails();

            mock.UnitPrice = TestUtility.Instance.RandomShort();
            mock.Quantity = TestUtility.Instance.RandomShort();
            mock.Discount = (float)TestUtility.Instance.RandomNumber();

            //OneToOneRelationship
            Orders mockOrdersByOrderId = OrdersTest.CreateMockInstance(tm);
            DataRepository.OrdersProvider.Insert(tm, mockOrdersByOrderId);
            mock.OrderId = mockOrdersByOrderId.OrderId;
            //OneToOneRelationship
            Products mockProductsByProductId = ProductsTest.CreateMockInstance(tm);
            DataRepository.ProductsProvider.Insert(tm, mockProductsByProductId);
            mock.ProductId = mockProductsByProductId.ProductId;

            // create a temporary collection and add the item to it
            TList<OrderDetails> tempMockCollection = new TList<OrderDetails>();
            tempMockCollection.Add(mock);
            tempMockCollection.Remove(mock);

               return (OrderDetails)mock;
        }
		///<summary>
		///  Returns a Typed SalesPerson Entity with mock values.
		///</summary>
		static public SalesPerson CreateMockInstance_Generated(TransactionManager tm)
		{		
			SalesPerson mock = new SalesPerson();
						
			mock.SalesQuota = TestUtility.Instance.RandomShort();
			mock.Bonus = TestUtility.Instance.RandomShort();
			mock.CommissionPct = TestUtility.Instance.RandomShort();
			mock.SalesYtd = TestUtility.Instance.RandomShort();
			mock.SalesLastYear = TestUtility.Instance.RandomShort();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			//OneToOneRelationship
			Employee mockEmployeeBySalesPersonId = EmployeeTest.CreateMockInstance(tm);
			DataRepository.EmployeeProvider.Insert(tm, mockEmployeeBySalesPersonId);
			mock.SalesPersonId = mockEmployeeBySalesPersonId.EmployeeId;
			int count1 = 0;
			TList<SalesTerritory> _collection1 = DataRepository.SalesTerritoryProvider.GetPaged(tm, 0, 10, out count1);
			//_collection1.Shuffle();
			if (_collection1.Count > 0)
			{
				mock.TerritoryId = _collection1[0].TerritoryId;
						
			}
		
			// create a temporary collection and add the item to it
			TList<SalesPerson> tempMockCollection = new TList<SalesPerson>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (SalesPerson)mock;
		}
		///<summary>
		///  Returns a Typed PurchaseOrderHeader Entity with mock values.
		///</summary>
		static public PurchaseOrderHeader CreateMockInstance_Generated(TransactionManager tm)
		{		
			PurchaseOrderHeader mock = new PurchaseOrderHeader();
						
			mock.RevisionNumber = TestUtility.Instance.RandomByte();
			mock.Status = TestUtility.Instance.RandomByte();
			mock.OrderDate = TestUtility.Instance.RandomDateTime();
			mock.ShipDate = TestUtility.Instance.RandomDateTime();
			mock.SubTotal = TestUtility.Instance.RandomShort();
			mock.TaxAmt = TestUtility.Instance.RandomShort();
			mock.Freight = TestUtility.Instance.RandomShort();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			int count0 = 0;
			TList<Employee> _collection0 = DataRepository.EmployeeProvider.GetPaged(tm, 0, 10, out count0);
			//_collection0.Shuffle();
			if (_collection0.Count > 0)
			{
				mock.EmployeeId = _collection0[0].EmployeeId;
						
			}
			int count1 = 0;
			TList<ShipMethod> _collection1 = DataRepository.ShipMethodProvider.GetPaged(tm, 0, 10, out count1);
			//_collection1.Shuffle();
			if (_collection1.Count > 0)
			{
				mock.ShipMethodId = _collection1[0].ShipMethodId;
						
			}
			int count2 = 0;
			TList<Vendor> _collection2 = DataRepository.VendorProvider.GetPaged(tm, 0, 10, out count2);
			//_collection2.Shuffle();
			if (_collection2.Count > 0)
			{
				mock.VendorId = _collection2[0].VendorId;
						
			}
		
			// create a temporary collection and add the item to it
			TList<PurchaseOrderHeader> tempMockCollection = new TList<PurchaseOrderHeader>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (PurchaseOrderHeader)mock;
		}
		///<summary>
		///  Returns a Typed EmployeePayHistory Entity with mock values.
		///</summary>
		static public EmployeePayHistory CreateMockInstance_Generated(TransactionManager tm)
		{		
			EmployeePayHistory mock = new EmployeePayHistory();
						
			mock.RateChangeDate = TestUtility.Instance.RandomDateTime();
			mock.Rate = TestUtility.Instance.RandomShort();
			mock.PayFrequency = TestUtility.Instance.RandomByte();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			//OneToOneRelationship
			Employee mockEmployeeByEmployeeId = EmployeeTest.CreateMockInstance(tm);
			DataRepository.EmployeeProvider.Insert(tm, mockEmployeeByEmployeeId);
			mock.EmployeeId = mockEmployeeByEmployeeId.EmployeeId;
		
			// create a temporary collection and add the item to it
			TList<EmployeePayHistory> tempMockCollection = new TList<EmployeePayHistory>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (EmployeePayHistory)mock;
		}
		///<summary>
		///  Returns a Typed CountryRegionCurrency Entity with mock values.
		///</summary>
		static public CountryRegionCurrency CreateMockInstance_Generated(TransactionManager tm)
		{		
			CountryRegionCurrency mock = new CountryRegionCurrency();
						
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			//OneToOneRelationship
			CountryRegion mockCountryRegionByCountryRegionCode = CountryRegionTest.CreateMockInstance(tm);
			DataRepository.CountryRegionProvider.Insert(tm, mockCountryRegionByCountryRegionCode);
			mock.CountryRegionCode = mockCountryRegionByCountryRegionCode.CountryRegionCode;
			//OneToOneRelationship
			Currency mockCurrencyByCurrencyCode = CurrencyTest.CreateMockInstance(tm);
			DataRepository.CurrencyProvider.Insert(tm, mockCurrencyByCurrencyCode);
			mock.CurrencyCode = mockCurrencyByCurrencyCode.CurrencyCode;
		
			// create a temporary collection and add the item to it
			TList<CountryRegionCurrency> tempMockCollection = new TList<CountryRegionCurrency>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (CountryRegionCurrency)mock;
		}
		///<summary>
		///  Returns a Typed SalesTerritory Entity with mock values.
		///</summary>
		static public SalesTerritory CreateMockInstance_Generated(TransactionManager tm)
		{		
			SalesTerritory mock = new SalesTerritory();
						
			mock.Name = TestUtility.Instance.RandomString(24, false);;
			mock.CountryRegionCode = TestUtility.Instance.RandomString(3, false);;
			mock.Group = TestUtility.Instance.RandomString(24, false);;
			mock.SalesYtd = TestUtility.Instance.RandomShort();
			mock.SalesLastYear = TestUtility.Instance.RandomShort();
			mock.CostYtd = TestUtility.Instance.RandomShort();
			mock.CostLastYear = TestUtility.Instance.RandomShort();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<SalesTerritory> tempMockCollection = new TList<SalesTerritory>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (SalesTerritory)mock;
		}
		///<summary>
		///  Returns a Typed NullFkeyChild Entity with mock values.
		///</summary>
		static public NullFkeyChild CreateMockInstance_Generated(TransactionManager tm)
		{		
			NullFkeyChild mock = new NullFkeyChild();
						
			mock.NullFkeyChildId = TestUtility.Instance.RandomNumber();
			mock.SomeText = TestUtility.Instance.RandomString(24, false);;
			
			//OneToOneRelationship
			NullFkeyParent mockNullFkeyParentByNullFkeyParentId = NullFkeyParentTest.CreateMockInstance(tm);
			DataRepository.NullFkeyParentProvider.Insert(tm, mockNullFkeyParentByNullFkeyParentId);
			mock.NullFkeyParentId = mockNullFkeyParentByNullFkeyParentId.NullFkeyParentId;
		
			// create a temporary collection and add the item to it
			TList<NullFkeyChild> tempMockCollection = new TList<NullFkeyChild>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (NullFkeyChild)mock;
		}
		///<summary>
		///  Returns a Typed ProductPhoto Entity with mock values.
		///</summary>
		static public ProductPhoto CreateMockInstance_Generated(TransactionManager tm)
		{		
			ProductPhoto mock = new ProductPhoto();
						
			mock.ThumbNailPhoto = new byte[] { TestUtility.Instance.RandomByte() };
			mock.ThumbnailPhotoFileName = TestUtility.Instance.RandomString(24, false);;
			mock.LargePhoto = new byte[] { TestUtility.Instance.RandomByte() };
			mock.LargePhotoFileName = TestUtility.Instance.RandomString(24, false);;
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<ProductPhoto> tempMockCollection = new TList<ProductPhoto>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (ProductPhoto)mock;
		}
		///<summary>
		///  Returns a Typed CurrencyRate Entity with mock values.
		///</summary>
		static public CurrencyRate CreateMockInstance_Generated(TransactionManager tm)
		{		
			CurrencyRate mock = new CurrencyRate();
						
			mock.CurrencyRateDate = TestUtility.Instance.RandomDateTime();
			mock.AverageRate = TestUtility.Instance.RandomShort();
			mock.EndOfDayRate = TestUtility.Instance.RandomShort();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			int count0 = 0;
			TList<Currency> _collection0 = DataRepository.CurrencyProvider.GetPaged(tm, 0, 10, out count0);
			//_collection0.Shuffle();
			if (_collection0.Count > 0)
			{
				mock.FromCurrencyCode = _collection0[0].CurrencyCode;
						
			}
			int count1 = 0;
			TList<Currency> _collection1 = DataRepository.CurrencyProvider.GetPaged(tm, 0, 10, out count1);
			//_collection1.Shuffle();
			if (_collection1.Count > 0)
			{
				mock.ToCurrencyCode = _collection1[0].CurrencyCode;
						
			}
		
			// create a temporary collection and add the item to it
			TList<CurrencyRate> tempMockCollection = new TList<CurrencyRate>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (CurrencyRate)mock;
		}
		///<summary>
		///  Returns a Typed ProductDescription Entity with mock values.
		///</summary>
		static public ProductDescription CreateMockInstance_Generated(TransactionManager tm)
		{		
			ProductDescription mock = new ProductDescription();
						
			mock.Description = TestUtility.Instance.RandomString(199, false);;
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<ProductDescription> tempMockCollection = new TList<ProductDescription>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (ProductDescription)mock;
		}
		///<summary>
		///  Returns a Typed CustomerAddress Entity with mock values.
		///</summary>
		static public CustomerAddress CreateMockInstance_Generated(TransactionManager tm)
		{		
			CustomerAddress mock = new CustomerAddress();
						
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			//OneToOneRelationship
			Address mockAddressByAddressId = AddressTest.CreateMockInstance(tm);
			DataRepository.AddressProvider.Insert(tm, mockAddressByAddressId);
			mock.AddressId = mockAddressByAddressId.AddressId;
			//OneToOneRelationship
			AddressType mockAddressTypeByAddressTypeId = AddressTypeTest.CreateMockInstance(tm);
			DataRepository.AddressTypeProvider.Insert(tm, mockAddressTypeByAddressTypeId);
			mock.AddressTypeId = mockAddressTypeByAddressTypeId.AddressTypeId;
			//OneToOneRelationship
			Customer mockCustomerByCustomerId = CustomerTest.CreateMockInstance(tm);
			DataRepository.CustomerProvider.Insert(tm, mockCustomerByCustomerId);
			mock.CustomerId = mockCustomerByCustomerId.CustomerId;
		
			// create a temporary collection and add the item to it
			TList<CustomerAddress> tempMockCollection = new TList<CustomerAddress>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (CustomerAddress)mock;
		}
		///<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;
		}
		///<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>
		///  Returns a Typed JobCandidate Entity with mock values.
		///</summary>
		static public JobCandidate CreateMockInstance_Generated(TransactionManager tm)
		{		
			JobCandidate mock = new JobCandidate();
						
			mock.Resume = "<test></test>";
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			//OneToOneRelationship
			Employee mockEmployeeByEmployeeId = EmployeeTest.CreateMockInstance(tm);
			DataRepository.EmployeeProvider.Insert(tm, mockEmployeeByEmployeeId);
			mock.EmployeeId = mockEmployeeByEmployeeId.EmployeeId;
		
			// create a temporary collection and add the item to it
			TList<JobCandidate> tempMockCollection = new TList<JobCandidate>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (JobCandidate)mock;
		}
예제 #52
0
		///<summary>
		///  Returns a Typed TestVariant Entity with mock values.
		///</summary>
		static public TestVariant CreateMockInstance_Generated(TransactionManager tm)
		{		
			TestVariant mock = new TestVariant();
						
			mock.VariantField = null;
			
		
			// create a temporary collection and add the item to it
			TList<TestVariant> tempMockCollection = new TList<TestVariant>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (TestVariant)mock;
		}
		///<summary>
		///  Returns a Typed DatabaseLog Entity with mock values.
		///</summary>
		static public DatabaseLog CreateMockInstance_Generated(TransactionManager tm)
		{		
			DatabaseLog mock = new DatabaseLog();
						
			mock.PostTime = TestUtility.Instance.RandomDateTime();
			mock.DatabaseUser = TestUtility.Instance.RandomString(63, false);;
			mock.SafeNameEvent = TestUtility.Instance.RandomString(63, false);;
			mock.Schema = TestUtility.Instance.RandomString(63, false);;
			mock.SafeNameObject = TestUtility.Instance.RandomString(63, false);;
			mock.Tsql = TestUtility.Instance.RandomString(2, false);;
			mock.XmlEvent = "<test></test>";
			
		
			// create a temporary collection and add the item to it
			TList<DatabaseLog> tempMockCollection = new TList<DatabaseLog>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (DatabaseLog)mock;
		}
예제 #54
0
		///<summary>
		///  Returns a Typed WorkOrder Entity with mock values.
		///</summary>
		static public WorkOrder CreateMockInstance_Generated(TransactionManager tm)
		{		
			WorkOrder mock = new WorkOrder();
						
			mock.OrderQty = TestUtility.Instance.RandomNumber();
			mock.ScrappedQty = TestUtility.Instance.RandomShort();
			mock.StartDate = TestUtility.Instance.RandomDateTime();
			mock.EndDate = TestUtility.Instance.RandomDateTime();
			mock.DueDate = TestUtility.Instance.RandomDateTime();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
			int count0 = 0;
			TList<Product> _collection0 = DataRepository.ProductProvider.GetPaged(tm, 0, 10, out count0);
			//_collection0.Shuffle();
			if (_collection0.Count > 0)
			{
				mock.ProductId = _collection0[0].ProductId;
						
			}
			int count1 = 0;
			TList<ScrapReason> _collection1 = DataRepository.ScrapReasonProvider.GetPaged(tm, 0, 10, out count1);
			//_collection1.Shuffle();
			if (_collection1.Count > 0)
			{
				mock.ScrapReasonId = _collection1[0].ScrapReasonId;
						
			}
		
			// create a temporary collection and add the item to it
			TList<WorkOrder> tempMockCollection = new TList<WorkOrder>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (WorkOrder)mock;
		}
		///<summary>
		///  Returns a Typed NullFkeyParent Entity with mock values.
		///</summary>
		static public NullFkeyParent CreateMockInstance_Generated(TransactionManager tm)
		{		
			NullFkeyParent mock = new NullFkeyParent();
						
			mock.NullFkeyParentId = TestUtility.Instance.RandomNumber();
			mock.SomeText = TestUtility.Instance.RandomString(24, false);;
			
		
			// create a temporary collection and add the item to it
			TList<NullFkeyParent> tempMockCollection = new TList<NullFkeyParent>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (NullFkeyParent)mock;
		}
예제 #56
0
		///<summary>
		///  Returns a Typed CreditCard Entity with mock values.
		///</summary>
		static public CreditCard CreateMockInstance_Generated(TransactionManager tm)
		{		
			CreditCard mock = new CreditCard();
						
			mock.CardType = TestUtility.Instance.RandomString(24, false);;
			mock.CardNumber = TestUtility.Instance.RandomString(11, false);;
			mock.ExpMonth = TestUtility.Instance.RandomByte();
			mock.ExpYear = TestUtility.Instance.RandomShort();
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<CreditCard> tempMockCollection = new TList<CreditCard>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (CreditCard)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;
		}
예제 #58
0
		///<summary>
		///  Returns a Typed Document Entity with mock values.
		///</summary>
		static public Document CreateMockInstance_Generated(TransactionManager tm)
		{		
			Document mock = new Document();
						
			mock.Title = TestUtility.Instance.RandomString(24, false);;
			mock.FileName = TestUtility.Instance.RandomString(199, false);;
			mock.FileExtension = TestUtility.Instance.RandomString(8, false);;
			mock.Revision = TestUtility.Instance.RandomString(5, false);;
			mock.ChangeNumber = TestUtility.Instance.RandomNumber();
			mock.Status = TestUtility.Instance.RandomByte();
			mock.DocumentSummary = TestUtility.Instance.RandomString(2, false);;
			mock.Document = new byte[] { TestUtility.Instance.RandomByte() };
			mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<Document> tempMockCollection = new TList<Document>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (Document)mock;
		}
예제 #59
0
		///<summary>
		///  Returns a Typed TestProduct Entity with mock values.
		///</summary>
		static public TestProduct CreateMockInstance_Generated(TransactionManager tm)
		{		
			TestProduct mock = new TestProduct();
						
			mock.ProductTypeId = TestUtility.Instance.RandomNumber();
			mock.DownloadId = TestUtility.Instance.RandomNumber();
			mock.ManufacturerId = TestUtility.Instance.RandomNumber();
			mock.BrandName = TestUtility.Instance.RandomString(249, false);;
			mock.ProductName = TestUtility.Instance.RandomString(249, false);;
			mock.ProductCode = TestUtility.Instance.RandomString(49, false);;
			mock.UniqueIdentifier = TestUtility.Instance.RandomString(249, false);;
			mock.TypeName = TestUtility.Instance.RandomString(24, false);;
			mock.ModelName = TestUtility.Instance.RandomString(74, false);;
			mock.DisplayName = TestUtility.Instance.RandomString(74, false);;
			mock.ProductLink = TestUtility.Instance.RandomString(499, false);;
			mock.ConnectorCode = TestUtility.Instance.RandomString(499, false);;
			mock.BaseId = TestUtility.Instance.RandomNumber();
			mock.OrgProductId = TestUtility.Instance.RandomNumber();
			mock.ImageFileType = TestUtility.Instance.RandomString(1, false);;
			mock.FullImageFileType = TestUtility.Instance.RandomString(1, false);;
			mock.Status = TestUtility.Instance.RandomString(1, false);;
			mock.AddedBy = TestUtility.Instance.RandomNumber();
			mock.AddedDate = TestUtility.Instance.RandomDateTime();
			mock.UpdatedBy = TestUtility.Instance.RandomNumber();
			mock.UpdatedDate = TestUtility.Instance.RandomDateTime();
			
		
			// create a temporary collection and add the item to it
			TList<TestProduct> tempMockCollection = new TList<TestProduct>();
			tempMockCollection.Add(mock);
			tempMockCollection.Remove(mock);
			
		
		   return (TestProduct)mock;
		}
		///<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;
		}