Пример #1
0
        public void SellByShouldDecreaseByOne()
        {
            var item    = new HamaraBasketItem(10, 10, ItemType.Expiring);
            var checker = new SellByUpdater();

            checker.UpdateSellBy(item);

            Assert.AreEqual(9, item.SellBy);
        }
Пример #2
0
        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);
        }