public void QualityShouldNeverExceedThreshold() { var item = new Item() { Quality = 50, }; var degrador = new BackstagePassDegradationStrategy(); degrador.Degrade(item); Assert.Equal(50, item.Quality); }
// “Aged Brie” actually increases in Quality the older it gets // “Backstage passes”, like aged brie, increases in Quality as it’s SellIn value approaches; // Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but Quality drops to 0 after the concert public void SomeProductsIncreaseInQualityOverTime(int sellIn, int expectedQuality) { var item = new Item() { Quality = 5, SellIn = sellIn }; var strategy = new BackstagePassDegradationStrategy(); strategy.Degrade(item); Assert.Equal(expectedQuality, item.Quality); }