예제 #1
0
        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");
        }
예제 #2
0
 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);
 }
예제 #3
0
 public void TestAddStock()
 {
     Inventory.AddStock("iron_plate", 1);
     Assert.AreEqual(Inventory.Stocks["iron_plate"], 41);
 }