예제 #1
0
        public void FineWineWillGainQuality()
        {
            var item = new FineWine(2, 0);

            item.UpdateItem();
            Assert.Equal(1, item.Quality);
        }
예제 #2
0
        public void FineWineSellInReducesOnUpdate()
        {
            var item = new FineWine(2, 0);

            item.UpdateItem();
            Assert.Equal(1, item.SellIn);
        }
예제 #3
0
        public void FineWine_Quality_will_not_exceed_50_with_negative_sellin()
        {
            var item = new FineWine(-1, 50);

            item.UpdateItem();
            Assert.Equal(50, item.Quality);
            Assert.Equal(-2, item.SellIn);
        }
예제 #4
0
        public void FineWine_When_sell_in_zero_quality_increases()
        {
            var item = new FineWine(0, 0);

            item.UpdateItem();
            Assert.Equal(2, item.Quality);
            Assert.Equal(-1, item.SellIn);

            item.UpdateItem();
            Assert.Equal(4, item.Quality);
            Assert.Equal(-2, item.SellIn);
        }