/*
         *  Es necesario probar que la implementación del método ChangeGreatsword
         *  efectivamente cambie el arco por uno nuevo, ya que esta es la finalidad
         *  del mismo. Si se cambiara la implementación y este test fallara, entonces
         *  estaría mal implementado el método.
         */
        public void ChangeGreatsword()
        {
            Greatsword newGreatsword = new Greatsword();

            this.knight.Greatsword = newGreatsword;
            Assert.AreEqual(this.knight.Greatsword, newGreatsword);
        }
        public void Setup()
        {
            knight = new Knight("Arturo");
            Greatsword gsword = new Greatsword();

            knight.Greatsword = gsword;
            HeavyArmor hArmor = new HeavyArmor();

            knight.HeavyArmor = hArmor;
            Helmet helmet = new Helmet();

            knight.Helmet = helmet;
        }
        public void CreateDefaultCharacter(string name)
        {
            Greatsword greatSword = new Greatsword();
            ScaleMail  scaleMail  = new ScaleMail();

            Level               = 1;
            Name                = name;
            _class              = new Fighter();
            Weapon              = greatSword;
            Armor               = scaleMail;
            Strength            = 16;
            Dexterity           = 14;
            Constitution        = 12;
            Intelligence        = 8;
            Wisdom              = 10;
            Charisma            = 11;
            MaxHeathPoints      = (byte)(_class.hitDie + ConstitutionModifier);
            CurrentHealthPoints = MaxHeathPoints;
        }
Beispiel #4
0
 public void SetContext(Greatsword ctx)
 {
     context = ctx;
     HookEvents();
     InitializeData();
 }
Beispiel #5
0
        /*
         *  Se le asigna un valor para checkear que la implementacion
         *  del setter no este fallando.
         */
        public void GreatSwordAttackDamage()
        {
            Greatsword greatsword = new Greatsword();

            Assert.AreEqual(greatsword.Attack, 45);
        }