private static void UpdateItem(Item item)
        {
            var sellInStrategy = SellInStrategyFactory.GetStrategy(item);

            sellInStrategy.UpdateSellIn(item);

            var qualityStrategy = QualityStrategyFactory.GetStrategy(item);

            qualityStrategy.UpdateQuality(item);
        }
示例#2
0
        public void GetStrategyReturnsAgedBrieQualityStrategyForAgedBrie()
        {
            var strategy = SellInStrategyFactory.GetStrategy(new LegendaryItem());

            Assert.IsInstanceOfType(strategy, typeof(SulfurasSellInStrategy));
        }
示例#3
0
        public void GetStrategyReturnsNormalQualityStrategyForNormalItem()
        {
            var strategy = SellInStrategyFactory.GetStrategy(new Item());

            Assert.IsInstanceOfType(strategy, typeof(DefaultSellInStrategy));
        }