public void UpdateQuality_AgedBrie_DoesntGoAbove50() { //Arrange var item = Constructors.ItemAgedBrie; item.Quality = 50; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(50, item.Quality); }
public void UpdateQuality_AgedBrie_IncreasesByOne() { //Arrange var item = Constructors.ItemAgedBrie; item.Quality = Constants.Zero; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(Constants.Zero + 1, item.Quality); }
public void UpdateQuality_ConjuredItem_DecreasesByTwo() { //Arrange var item = Constructors.ItemConjured; item.Quality = Constants.Ten; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(Constants.Ten - 2, item.Quality); }
public void UpdateQuality_ConjuredItem_DoesntGoBelowZero() { //Arrange var item = Constructors.ItemConjured; item.Quality = Constants.Zero; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(Constants.Zero, item.Quality); }
public void UpdateQuality_BackstagePasses_RevertsToZero() { //Arrange var item = Constructors.ItemBackstagePasses; item.SellIn = -1; item.Quality = Constants.Ten; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(Constants.Zero, item.Quality); }
public void UpdateQuality_BackstagePasses_IncreasesByThree(int sellIn) { //Arrange var item = Constructors.ItemBackstagePasses; item.SellIn = sellIn; item.Quality = Constants.Zero; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(Constants.Zero + 3, item.Quality); }
public void UpdateQuality_ItemQualityMultipliable_IncreasesByTwo() { //Arrange var item = new ItemQualityMultipliable(new QualityTickMultiplier(null, -1)) { Name = "", Quality = 10, SellIn = -1 }; var qualityCalculator = new ItemQualityMultipliableQualityCalculator(); //Act qualityCalculator.UpdateQuality(item); //Assert Assert.Equal(12, item.Quality); }