static public ProductVendor CreateMockInstance_Generated(TransactionManager tm)
{
ProductVendor mock = new ProductVendor();
mock.AverageLeadTime = TestUtility.Instance.RandomNumber();
mock.StandardPrice = TestUtility.Instance.RandomShort();
mock.LastReceiptCost = TestUtility.Instance.RandomShort();
mock.LastReceiptDate = TestUtility.Instance.RandomDateTime();
mock.MinOrderQty = TestUtility.Instance.RandomNumber();
mock.MaxOrderQty = TestUtility.Instance.RandomNumber();
mock.OnOrderQty = TestUtility.Instance.RandomNumber();
mock.ModifiedDate = TestUtility.Instance.RandomDateTime();
//OneToOneRelationship
Product mockProductByProductId = ProductTest.CreateMockInstance(tm);
DataRepository.ProductProvider.Insert(tm, mockProductByProductId);
mock.ProductId = mockProductByProductId.ProductId;
//OneToOneRelationship
UnitMeasure mockUnitMeasureByUnitMeasureCode = UnitMeasureTest.CreateMockInstance(tm);
DataRepository.UnitMeasureProvider.Insert(tm, mockUnitMeasureByUnitMeasureCode);
mock.UnitMeasureCode = mockUnitMeasureByUnitMeasureCode.UnitMeasureCode;
//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<ProductVendor> tempMockCollection = new TList<ProductVendor>();
tempMockCollection.Add(mock);
tempMockCollection.Remove(mock);
return (ProductVendor)mock;
}