///<summary> /// Returns a Typed ProductModelProductDescriptionCulture Entity with mock values. ///</summary> static public ProductModelProductDescriptionCulture CreateMockInstance_Generated(TransactionManager tm) { ProductModelProductDescriptionCulture mock = new ProductModelProductDescriptionCulture(); mock.ModifiedDate = TestUtility.Instance.RandomDateTime(); //OneToOneRelationship Culture mockCultureByCultureId = CultureTest.CreateMockInstance(tm); DataRepository.CultureProvider.Insert(tm, mockCultureByCultureId); mock.CultureId = mockCultureByCultureId.CultureId; //OneToOneRelationship ProductDescription mockProductDescriptionByProductDescriptionId = ProductDescriptionTest.CreateMockInstance(tm); DataRepository.ProductDescriptionProvider.Insert(tm, mockProductDescriptionByProductDescriptionId); mock.ProductDescriptionId = mockProductDescriptionByProductDescriptionId.ProductDescriptionId; //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 <ProductModelProductDescriptionCulture> tempMockCollection = new TList <ProductModelProductDescriptionCulture>(); tempMockCollection.Add(mock); tempMockCollection.Remove(mock); return((ProductModelProductDescriptionCulture)mock); }
///<summary> /// Update the Typed Culture Entity with modified mock values. ///</summary> static public void UpdateMockInstance(TransactionManager tm, Culture mock) { CultureTest.UpdateMockInstance_Generated(tm, mock); // make any alterations necessary // (i.e. for DB check constraints, special test cases, etc.) SetSpecialTestData(mock); }
///<summary> /// Returns a Typed Culture Entity with mock values. ///</summary> static public Culture CreateMockInstance(TransactionManager tm) { // get the default mock instance Culture mock = CultureTest.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 ProductModelProductDescriptionCulture Entity with modified mock values. ///</summary> static public void UpdateMockInstance_Generated(TransactionManager tm, ProductModelProductDescriptionCulture mock) { mock.ModifiedDate = TestUtility.Instance.RandomDateTime(); //OneToOneRelationship Culture mockCultureByCultureId = CultureTest.CreateMockInstance(tm); DataRepository.CultureProvider.Insert(tm, mockCultureByCultureId); mock.CultureId = mockCultureByCultureId.CultureId; //OneToOneRelationship ProductDescription mockProductDescriptionByProductDescriptionId = ProductDescriptionTest.CreateMockInstance(tm); DataRepository.ProductDescriptionProvider.Insert(tm, mockProductDescriptionByProductDescriptionId); mock.ProductDescriptionId = mockProductDescriptionByProductDescriptionId.ProductDescriptionId; //OneToOneRelationship ProductModel mockProductModelByProductModelId = ProductModelTest.CreateMockInstance(tm); DataRepository.ProductModelProvider.Insert(tm, mockProductModelByProductModelId); mock.ProductModelId = mockProductModelByProductModelId.ProductModelId; }