/// <summary> /// An item /// </summary> /// <param name="item"></param> /// <returns></returns> public Item UpdateItem(BaseItem item) { if (item.IsSellInNonPositiveInteger()) { item.DecreaseQuality(2); } else { item.DecreaseQuality(1); } item.DecreaseSellIn(); Printer.PrintItem(this.GetType().Name, item); return(item); }
public void DecreaseQuality() { var baseItem = new BaseItem("Base name", 0, 40); var value = 19; baseItem.DecreaseQuality(value); Assert.Equal(baseItem.Quality, 21); }