Esempio n. 1
0
        public void getMaxInventorySize_returns_number_of_items_a_player_can_carry_when_they_have_no_items()
        {
            var player = new PlayerBuilder()
                         .With(i => i.Items, new List <Item>())
                         .BuildAndSave();

            Assert.That(player.GetMaxInventorySize(), Is.EqualTo(6));
        }
Esempio n. 2
0
        public void getMaxInventorySize_returns_number_of_items_a_player_can_carry_when_they_have_some_buffs()
        {
            var items = new List <Item>();

            var item1 = new ItemBuilder()
                        .With(i => i.IsEquipped, false)
                        .BuildAndSave();

            var item2 = new ItemBuilder()
                        .With(i => i.IsEquipped, false)
                        .BuildAndSave();

            items.Add(item1);
            items.Add(item2);

            var player = new PlayerBuilder()
                         .With(i => i.Items, items)
                         .With(i => i.ExtraInventory, 2)
                         .BuildAndSave();

            Assert.That(player.GetMaxInventorySize(), Is.EqualTo(8));
        }