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