private Item UpdateQualityReturnItem(IList<Item> items, string itemName)
 {
     var inventoryProgram = new Program(items);
     inventoryProgram.UpdateQuality();
     return inventoryProgram.FindItemByName(itemName);
 }
 public void TestWeCanFindItemByNameReturnsNullWhenThereAreNoItems()
 {
     var inventoryProgram = new Program();
     var item = inventoryProgram.FindItemByName("NonExistentItem");
     Assert.IsNull(item);
 }
 public void TestWeCanFindItemByNameReturnsNullWhenThereIsNoMatch()
 {
     var inventoryProgram = new Program(new List<Item> { CreateItem1(), CreateItem2() });
     var item = inventoryProgram.FindItemByName("NonExistentItem");
     Assert.IsNull(item);
 }
 public void TestWeCanFindItemByName()
 {
     var inventoryProgram = new Program(new List<Item> { CreateItem1(), CreateItem2() });
     var item = inventoryProgram.FindItemByName("Item2");
     Assert.IsNotNull(item);
     Assert.AreEqual("Item2", item.Name);
 }