public void quality_double_degrade_when_sellin_value_has_passed() { var product = new AnyProduct { Sellin = -1, Quality = 10 }; product.UpdateProduct(); product.Sellin.Should().Be(-2); product.Quality.Should().Be(8); }
public void when_quality_will_be_negative_return_gildedrose_exception_with_async_method() { var product = new AnyProduct() { Sellin = -1, Quality = 0 }; var ex = Assert.Throws <GildedRoseException>(() => product.UpdateProduct()); ex.MessageError.Should().Be("The quality never can be negative"); }
public void quality_normal_degrade_when_sellin_value_not_has_passed() { var product = new AnyProduct { Sellin = 10, Quality = 10 }; product.UpdateProduct(); product.Sellin.Should().Be(9); product.Quality.Should().Be(9); }