public void QualityIncreasesBy1WhenSellInBiggerThan10() { var startingQuality = 20; var item = new BackStagePassItem("Backstage passes to a TAFKAL80ETC concert", 11, startingQuality); var updater = new BackStagePassItemUpdater(); updater.UpdateItem(item); Assert.Equal(item.Quality, startingQuality + 1); }
public void QualityIncreasesBy3WhenSellInBetween5And1() { var startingQuality = 20; var item = new BackStagePassItem("Backstage passes to a TAFKAL80ETC concert", 1, startingQuality); var updater = new BackStagePassItemUpdater(); updater.UpdateItem(item); Assert.Equal(item.Quality, startingQuality + 3); }
public void QualityIsZeroWhenSellInIsNegative() { var item = new BackStagePassItem("Backstage passes to a TAFKAL80ETC concert", 15, 20); var updater = new BackStagePassItemUpdater(); for (var i = 0; i < 16; i++) { updater.UpdateItem(item); } Assert.Equal(item.Quality, 0); }
// Run updater for backStagePass Item public void RunUpdater(BackStagePassItem item) { var updater = new BackStagePassItemUpdater(); updater.UpdateItem(item); }