public void Quality_Never_Increases_Over_50() { var quality = new csharp.Quality(50); ++quality; Assert.That(quality.Equals(50)); }
public void Quality_Of_An_Item_Never_Gets_Negative() { var quality = new csharp.Quality(1); --quality; --quality; Assert.That(quality.Equals(0)); }
public void Test_Special_Quality_Descrease( Func <int, csharp.Quality> requiredQuality, Item item, string testDescription) { Console.WriteLine(testDescription); var app = new csharp.GildedRose( new ItemGroup(new List <Item> { item }, CreateDefaultRules.CreateWithConjuredRule())); var actQuality = new csharp.Quality(item.Quality); Enumerable.Range(1, item.SellIn).ToList().ForEach(i => { app.UpdateQuality(); actQuality = requiredQuality(actQuality); Assert.AreEqual(actQuality, (int)item.Quality); }); }