Beispiel #1
0
        public void DoesNotEquipArmorIfNotProficient()
        {
            var equip              = new PurchaseInitialArmor(new TestArmorGateway());
            var inventory          = new Inventory();
            var armorProficiencies = new List <ArmorProficiency>();

            equip.PurchaseArmorAndShield(inventory, armorProficiencies);
            Assert.IsTrue(inventory.GearOfType <Armor>().Count() == 0);
        }
Beispiel #2
0
        public void DoesNotEquipShieldIfNotProficient()
        {
            var equip              = new PurchaseInitialArmor(new TestArmorGateway());
            var inventory          = new Inventory();
            var armorProficiencies = new List <ArmorProficiency>();

            armorProficiencies.Add(new ArmorProficiency("Heavy"));
            equip.PurchaseArmorAndShield(inventory, armorProficiencies);
            Assert.IsTrue(inventory.GearOfType <Armor>().Count() > 0);
            Assert.IsFalse(inventory.GearOfType <Armor>().Any(x => x.ArmorType == ArmorType.Shield));
        }