예제 #1
0
        public void when_quality_will_be_greater_than_50_return_gildedrose_exception()
        {
            var product = new AgedBrieProduct {
                Name = "Aged Brie", Sellin = -1, Quality = 50
            };

            var ex = Assert.Throws <GildedRoseException>(() => product.UpdateProduct());

            ex.MessageError.Should().Be("The quality never can be greater than 50");
        }
예제 #2
0
        public void quality_increase_when_product_name_is_aged_brie()
        {
            var product = new AgedBrieProduct {
                Name = "Aged Brie", Sellin = 10, Quality = 10
            };

            product.UpdateProduct();

            product.Sellin.Should().Be(9);
            product.Quality.Should().Be(11);
        }