public void Age_WhenCalled_ShouldDecreaseSellInByOne(int sellIn) { // Arrange var item = new BackstagePass("", sellIn, 0); // Act item.Age(); // Assert item.SellIn.ShouldBe(sellIn - 1); }
public void Age_WhenQualityIsFifty_ShouldNotIncreaseQuality() { // Arrange var item = new BackstagePass("", 4, 50); // Act item.Age(); // Assert item.Quality.ShouldBe(50); }
public void Age_WhenSellInIsZeroOrNegative_ShouldSetDegradationRateAndQualityToZero(int sellIn) { // Arrange var item = new BackstagePass("", sellIn, 10); // Act item.Age(); // Assert item.Quality.ShouldBe(0); item.DegradationRate.ShouldBe(0); }
public void Age_WhenSellInIsBetweenOneAndFive_ShouldIncreaseQualityByThree(int sellIn) { // Arrange var initialQuality = 10; var item = new BackstagePass("", sellIn, initialQuality); // Act item.Age(); // Assert item.Quality.ShouldBe(initialQuality + 3); item.DegradationRate.ShouldBe(-3); }
public void Age_WhenSellInIsAboveTen_ShouldIncreaseQualityByOne(int sellIn) { // Arrange var initialQuality = 10; var item = new BackstagePass("", sellIn, initialQuality); // Act item.Age(); // Assert item.Quality.ShouldBe(initialQuality + 1); item.DegradationRate.ShouldBe(-1); }