示例#1
0
        public IEnumerator SortByName()
        {
            var i         = new Dummy_Inventory(9);
            var itemDataA = new Item("TestA", 1);
            var itemDataB = new Item("TestB", 1);

            i.AddItem(itemDataA, 1);
            i.AddItem(itemDataB, 1);
            i.SortByName();
            Assert.AreEqual(itemDataA, i.GetItem(0));
            Assert.AreEqual(itemDataB, i.GetItem(1));
            yield return(null);
        }