예제 #1
0
        public void TEST_UpdateItems_GIVEN_AgedBrieItemQualityIs0_THEN_ItIncreasesInQualityBy1()
        {
            var expectedQuality = 1;
            var expectedSellIn  = 5;

            var item = new ItemBuilder()
                       .WithQuality(0)
                       .WithSellIn(6)
                       .Build();

            var target = new AgedBrieItemTestBuilder()
                         .Build();

            var result = target.UpdateItem(item);

            Assert.Equal(expectedQuality, result.Quality);
            Assert.Equal(expectedSellIn, result.SellIn);
        }
예제 #2
0
        public void TEST_UpdateItems_GIVEN_AgedBrieItemQualityIs50_THEN_ItDoNotIncreseQualityHigherThen50()
        {
            var expectedQuality = 50;
            var expectedSellIn  = -1;

            var item = new ItemBuilder()
                       .WithQuality(50)
                       .WithSellIn(0)
                       .Build();

            var target = new AgedBrieItemTestBuilder()
                         .Build();

            var result = target.UpdateItem(item);

            Assert.Equal(expectedQuality, result.Quality);
            Assert.Equal(expectedSellIn, result.SellIn);
        }