Exemplo n.º 1
0
        public void TEST_GetName_THEN_ItReturnsAgedBrie()
        {
            var target = new AgedBrieItemTestBuilder()
                         .Build();

            var result = target.GetName();

            Assert.Equal("Aged Brie", result);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
        }