///<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> /// Update the Typed CountryRegion Entity with modified mock values. ///</summary> static public void UpdateMockInstance(TransactionManager tm, CountryRegion mock) { CountryRegionTest.UpdateMockInstance_Generated(tm, mock); // make any alterations necessary // (i.e. for DB check constraints, special test cases, etc.) SetSpecialTestData(mock); }
///<summary> /// Returns a Typed CountryRegion Entity with mock values. ///</summary> static public CountryRegion CreateMockInstance(TransactionManager tm) { // get the default mock instance CountryRegion mock = CountryRegionTest.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 CountryRegionCurrency Entity with modified mock values. ///</summary> static public void UpdateMockInstance_Generated(TransactionManager tm, CountryRegionCurrency mock) { 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; }