Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        // Run updater for backStagePass Item
        public void RunUpdater(BackStagePassItem item)
        {
            var updater = new BackStagePassItemUpdater();

            updater.UpdateItem(item);
        }