private static void UpdateItem(Item item) { var sellInStrategy = SellInStrategyFactory.GetStrategy(item); sellInStrategy.UpdateSellIn(item); var qualityStrategy = QualityStrategyFactory.GetStrategy(item); qualityStrategy.UpdateQuality(item); }
public void GetStrategyReturnsAgedBrieQualityStrategyForAgedBrie() { var strategy = SellInStrategyFactory.GetStrategy(new LegendaryItem()); Assert.IsInstanceOfType(strategy, typeof(SulfurasSellInStrategy)); }
public void GetStrategyReturnsNormalQualityStrategyForNormalItem() { var strategy = SellInStrategyFactory.GetStrategy(new Item()); Assert.IsInstanceOfType(strategy, typeof(DefaultSellInStrategy)); }