using System.Collections.Generic; using Xunit; namespace csharpcore { // "Conjured" items degrade in Quality twice as fast as normal items public class ConjuredTest { private readonly List _items; private GildedRose _rose; public ConjuredTest() { _items = new List(); _rose =new GildedRose(_items); } //[Fact] public void ShouldDecreaseInQuality() { var item = GenerateItem(3, 2); _items.Add(item); _rose.UpdateQuality(); Assert.Equal(1, item.Quality); Assert.Equal(1, item.SellIn); } public Item GenerateItem(int quality, int sellInDays) => new Item {Name = "Conjured Mana Cake", Quality = quality, SellIn = sellInDays}; } }