public void CanCreateAgedBrie() { _inventory.InventoryItems.Clear(); _inventory.AddStock("Aged Brie", 1, 1, new IncreasingQualityCalculator()); var result = _inventory.InventoryItems.Any(x => x.NormalizedName == "Aged Brie".Normalize() && x.SellInValue == 1 && x.Quality == 1); Assert.True(result, "Aged Brie 1 1 has been created"); }
private static void addToInventory(string name, int sellInValue, uint quality, IQualityCalculator qualityCalculator, bool canDegradeByDate = true) { Console.WriteLine($"Adding {name} {sellInValue} {quality}"); _inventory.AddStock(name, sellInValue, quality, qualityCalculator, canDegradeByDate); }
public void TestAddStock() { Inventory.AddStock("iron_plate", 1); Assert.AreEqual(Inventory.Stocks["iron_plate"], 41); }