示例#1
0
文件: Test.cs 项目: claudyy/Inventory
        public IEnumerator AddItemCheckCount()
        {
            var i        = new Dummy_Inventory(9);
            var itemData = new Item("Test1", 1);

            i.AddItem(itemData, 4);
            Assert.AreEqual(i.CountOfItem(itemData) == 4, true);
            Assert.AreEqual(i.CountOfItem(itemData) == 6, false);
            i.AddItem(itemData, 6);
            Assert.AreEqual(i.CountOfItem(itemData) == 10, true);
            Assert.AreEqual(i.CountOfItem(itemData) == 12, false);
            yield return(null);
        }