public void TestItemValidName(string name, bool valid)
        {
            var newItem = InventoryItem.CreateInventoryItem(name, 1, 2);

            if (valid)
            {
                Assert.IsFalse(newItem is InvalidInventoryItem);
            }
            else
            {
                Assert.IsTrue(newItem is InvalidInventoryItem);
            }
        }
        public void TestItemInventoryUpdate(string name, int inputSellIn, int inputQuality, int outputSellIn, int outputQuality)
        {
            var item = InventoryItem.CreateInventoryItem(name, inputSellIn, inputQuality);

            item.ProcessInventoryUpdate();

            if (item is InvalidInventoryItem)
            {
                Assert.Fail("Item is invalid");
            }

            Assert.AreEqual(name, item.Name);
            Assert.AreEqual(outputSellIn, item.SellIn);
            Assert.AreEqual(outputQuality, item.Quality);
        }
 public void TestInventoryItemCanBeConstructed(string name, int sellIn, int quality)
 {
     Assert.DoesNotThrow(() => InventoryItem.CreateInventoryItem(name, sellIn, quality));
 }