public void Match_gold_master() { var app = ProgramFactory.Create( new Item { Name = "+5 Dexterity Vest", SellIn = 10, Quality = 20 }, new Item { Name = "Aged Brie", SellIn = 2, Quality = 0 }, new Item { Name = "Elixir of the Mongoose", SellIn = 5, Quality = 7 }, new Item { Name = "Sulfuras, Hand of Ragnaros", SellIn = 0, Quality = 80 }, new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 15, Quality = 20 } /*, * new Item {Name = "Conjured Mana Cake", SellIn = 3, Quality = 6}*/ ); app.UpdateQuality(); var output = Print(app); output.Should().Be(GoldMaster); }
public void The_rate_quality_improves_by_increases_closer_to_sellin(int sellIn, int expectedQuality) { var item = new Item { Name = "Backstage passes to a TAFKAL80ETC concert", Quality = 12, SellIn = sellIn }; var app = ProgramFactory.Create(item); app.UpdateQuality(); item.Quality.Should().Be(expectedQuality); }
public void Quality_and_sellin_never_changes() { var item = new Item { Name = "Sulfuras, Hand of Ragnaros", Quality = 80, SellIn = 0 }; var app = ProgramFactory.Create(item); app.UpdateQuality(); var actual = new { item.Quality, item.SellIn }; actual.Should().Be(new { Quality = 80, SellIn = 0 }); }
public void Quality_increase_by_1_as_sellin_decreases_by_1() { var item = new Item { Name = "Aged Brie", Quality = 10, SellIn = 10 }; var app = ProgramFactory.Create(item); app.UpdateQuality(); var actual = new { item.Quality, item.SellIn }; actual.Should().Be(new { Quality = 11, SellIn = 9 }); }