public void SellByShouldDecreaseByOne() { var item = new HamaraBasketItem(10, 10, ItemType.Expiring); var checker = new SellByUpdater(); checker.UpdateSellBy(item); Assert.AreEqual(9, item.SellBy); }
public void UpdateSellByAndQuality() { var item = new HamaraBasketItem(10, 20, ItemType.Legendary); var qualityChecker = QualityCheckProvider.GetChecker(item.ItemType); var sellByUpdater = new SellByUpdater(); sellByUpdater.UpdateSellBy(item); qualityChecker.UpdateQuality(item); }