public void InventoryRecord_ShouldHave_ProductID_Increment_Notes() { InventoryRecord rec = new InventoryRecord(1, 1, "notes"); Assert.AreEqual(1, rec.ProductID); Assert.AreEqual(1, rec.Increment); Assert.AreEqual("notes", rec.Notes); }
public TestInventoryRepository() { inventoryRecords = new List<InventoryRecord>(); //one for each product TestCatalogRepository catalog = new TestCatalogRepository(); List<Product> prods = catalog.GetProducts().ToList(); foreach (Product p in prods) { InventoryRecord rec = new InventoryRecord(p.ID,1,"test entry"); inventoryRecords.Add(rec); } }
public void Increment(int productID, int amount, string notes) { InventoryRecord record = new InventoryRecord(productID, amount, notes); inventoryRecords.Add(record); }