public void ConjuredItemsQualityDecreasesTwiceAsFastWhenNotExpired() { var conjuredItem = new ConjuredItem { Quality = 4, SellIn = 1 }; conjuredItem.UpdateQuality(); Check.That(conjuredItem.Quality).IsEqualTo(2); }
public void ConjuredItemsQualityCannotDecreaseBelowZero() { var conjuredItem = new ConjuredItem { Quality = 1, SellIn = 0 }; conjuredItem.UpdateQuality(); Check.That(conjuredItem.Quality).IsZero(); }
public void Conjured_Items_Should_Degrade_In_Quality_Four_Times_As_Fast_As_Normal_Items_After_Sell_Date() { // Arrange var conjuredItem = new ConjuredItem("Conjured Mana Cake", 0, 6); // Act conjuredItem.UpdateQuality(); // Assert Assert.AreEqual(conjuredItem.Quality, 2); }
public void Conjured_Items_Should_Degrade_In_Quality_Twice_As_Fast_As_Normal_Items() { // Arrange var conjuredItem = new ConjuredItem("Conjured Mana Cake", 3, 6); // Act conjuredItem.UpdateQuality(); // Assert Assert.AreEqual(conjuredItem.Quality, 4); Assert.AreEqual(conjuredItem.SellIn, 2); }
public void ConjuredItemUpdateQualityTest() { var item = new ConjuredItem() { Quality = 1, SellIn = -1 }; item.UpdateQuality(); Assert.IsTrue(item.Quality == 0 && item.SellIn == -2); }
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); }