public static void Setup(int testItems) { SetTestRepo(); for(int i=0;i<testItems;i++){ Product item=new Product(); _testRepo._items.Add(item); } }
public void Insert(string ProductName,int? SupplierID,int? CategoryID,string QuantityPerUnit,decimal? UnitPrice,short? UnitsInStock,short? UnitsOnOrder,short? ReorderLevel,bool Discontinued,bool? IsDeleted) { Product item = new Product(); item.ProductName = ProductName; item.SupplierID = SupplierID; item.CategoryID = CategoryID; item.QuantityPerUnit = QuantityPerUnit; item.UnitPrice = UnitPrice; item.UnitsInStock = UnitsInStock; item.UnitsOnOrder = UnitsOnOrder; item.ReorderLevel = ReorderLevel; item.Discontinued = Discontinued; item.IsDeleted = IsDeleted; item.Save(UserName); }
public static void Setup(Product item) { SetTestRepo(); _testRepo._items.Add(item); }