static public CreateMockInstance ( TransactionManager tm ) : |
||
tm | TransactionManager | |
리턴 |
///<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); }
///<summary> /// Returns a Typed EmployeeAddress Entity with mock values. ///</summary> static public EmployeeAddress CreateMockInstance_Generated(TransactionManager tm) { EmployeeAddress mock = new EmployeeAddress(); mock.ModifiedDate = TestUtility.Instance.RandomDateTime(); //OneToOneRelationship Address mockAddressByAddressId = AddressTest.CreateMockInstance(tm); DataRepository.AddressProvider.Insert(tm, mockAddressByAddressId); mock.AddressId = mockAddressByAddressId.AddressId; //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 <EmployeeAddress> tempMockCollection = new TList <EmployeeAddress>(); tempMockCollection.Add(mock); tempMockCollection.Remove(mock); return((EmployeeAddress)mock); }
///<summary> /// Update the Typed EmployeeAddress Entity with modified mock values. ///</summary> static public void UpdateMockInstance_Generated(TransactionManager tm, EmployeeAddress mock) { mock.ModifiedDate = TestUtility.Instance.RandomDateTime(); //OneToOneRelationship Address mockAddressByAddressId = AddressTest.CreateMockInstance(tm); DataRepository.AddressProvider.Insert(tm, mockAddressByAddressId); mock.AddressId = mockAddressByAddressId.AddressId; //OneToOneRelationship Employee mockEmployeeByEmployeeId = EmployeeTest.CreateMockInstance(tm); DataRepository.EmployeeProvider.Insert(tm, mockEmployeeByEmployeeId); mock.EmployeeId = mockEmployeeByEmployeeId.EmployeeId; }
///<summary> /// Update the Typed VendorAddress Entity with modified mock values. ///</summary> static public void UpdateMockInstance_Generated(TransactionManager tm, VendorAddress mock) { 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; }