public void ShouldCreateAnAgedBrieItem() { // Prepare var itemName = "Aged Brie"; var itemQuality = 1; var itemSellin = 1; var initialItem = new Item { Name = itemName, Quality = itemQuality, SellIn = itemSellin }; // Act var actualResult = _itemFactory.CreateSubItemFromItemName(initialItem); // Test Assert.IsType <AgedBrie>(actualResult); }
public void UpdateQuality() { _items.ForEach(item => { var subItem = _itemFactory.CreateSubItemFromItemName(item); subItem.UpdateQuality(); item.Quality = subItem.Quality; item.SellIn = subItem.SellIn; }); }