public void Backstage_Item_Should_Increase_By_3_In_Quality_As_Its_SellIn_Value_pproaches_5_days() { // Arrange var backstageItem = new BackstageItem("Backstage passes to a TAFKAL80ETC concert", 5, 40); // Act backstageItem.UpdateQuality(); // Assert Assert.AreEqual(backstageItem.Quality, 43); }
public void Backstage_Item_Should_Drop_To_Zero_Quality_As_Its_SellIn_Value_passes() { // Arrange var backstageItem = new BackstageItem("Backstage passes to a TAFKAL80ETC concert", -1, 40); // Act backstageItem.UpdateQuality(); // Assert Assert.AreEqual(backstageItem.Quality, 0); }
public void The_Quality_Of_An_Item_Should_Never_Be_More_Than_50_For_BackStage_And_Aged_Items() { // Arrange var backstageItem = new BackstageItem("Backstage passes to a TAFKAL80ETC concert", 20, 50); var agedItem = new AgedItem("Aged Brie", 2, 50); // Act backstageItem.UpdateQuality(); agedItem.UpdateQuality(); // Assert Assert.AreEqual(backstageItem.Quality, 50); Assert.AreEqual(agedItem.Quality, 50); }
public void Updating_The_Quality_Of_An_Item_Should_Never_Be_Negative() { // Arrange var commonItem = new CommonItem("+5 Dexterity Vest", 0, 0); var backstageItem = new BackstageItem("Backstage passes to a TAFKAL80ETC concert", 20, 0); var agedItem = new AgedItem("Aged Brie", 2, 0); var conjuredItem = new ConjuredItem("Conjured Mana Cake", 3, 0); var legendaryItem = new LegendaryItem("Sulfuras, Hand of Ragnaros", 0, 80); // Act commonItem.UpdateQuality(); backstageItem.UpdateQuality(); agedItem.UpdateQuality(); conjuredItem.UpdateQuality(); legendaryItem.UpdateQuality(); // Assert Assert.AreEqual(commonItem.Quality, 0); Assert.AreEqual(backstageItem.Quality, 1); Assert.AreEqual(agedItem.Quality, 1); Assert.AreEqual(conjuredItem.Quality, 0); Assert.AreEqual(legendaryItem.Quality, 80); }