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

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

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

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