Пример #1
0
        public void Character_DefaultWeaponIsSetAtConstruction()
        {
            IWeaponBehaviour expectedDefaultWeapon = new Sword();

            Character character = new King("Johnny");

            Assert.AreEqual(character.UseWeapon(), expectedDefaultWeapon.UseWeapon());
        }
Пример #2
0
        public void Character_CanChangeWeaponAtRunTime()
        {
            Character character = new King("Johnny");
            IWeaponBehaviour newWeapon = new Bow();

            character.Weapon = newWeapon;

            Assert.AreEqual(character.UseWeapon(), newWeapon.UseWeapon());
        }