示例#1
0
        public void SetItem()
        {
            TestInventory inventory = CreateInventory();
            var           item      = new Item(new ItemTemplate());

            inventory.SetItem(1, item);
            Assert.Equal(item, inventory.Items[1]);
        }
示例#2
0
        public void SetItemOnSlotGraterThenSlotsCountThrowException()
        {
            TestInventory inventory = CreateInventory(99);

            Xunit.Assert.Throws <ArgumentOutOfRangeException>(() => inventory.SetItem(100, null));
        }
示例#3
0
        public void SetItemOnNegativeSlotThrowException()
        {
            TestInventory inventory = CreateInventory();

            Xunit.Assert.Throws <ArgumentOutOfRangeException>(() => inventory.SetItem(-1, null));
        }