Exemplo n.º 1
0
        public void MaximumCloseCombatWeaponsReached()
        {
            var warrior = new WitchHunterCaptain();

            ICloseCombatWeapon singleHandenWeapon = new Dagger();
            ICloseCombatWeapon twoHandWeapon      = new WeepingBlades();

            Assert.IsFalse(warrior.MaximumCloseCombatWeaponsReached());
            warrior.AddEquipment(singleHandenWeapon);
            Assert.IsFalse(warrior.MaximumCloseCombatWeaponsReached());

            warrior.AddEquipment(singleHandenWeapon);
            warrior.AddEquipment(singleHandenWeapon);

            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached());

            warrior.RemoveEquipment(singleHandenWeapon);
            warrior.RemoveEquipment(singleHandenWeapon);
            warrior.RemoveEquipment(singleHandenWeapon);

            Assert.AreEqual(0, warrior.Equipment.Count);

            warrior.AddEquipment(singleHandenWeapon);
            warrior.AddEquipment(twoHandWeapon);

            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached());

            warrior.RemoveEquipment(singleHandenWeapon);
            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached(), "Weeping blades is a pair");
        }