示例#1
0
        public void BloodLustSpell_ShouldMakeDamage_WhenCasted()
        {
            IWarriorHero hero  = ClassFactory.CreateWarrior("Grommash");
            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.MissChance = 0;
            double health = dummy.HealthCurr;

            hero.CastTo(WarriorSpellFactory.CreateBloodLust(), dummy);

            Assert.AreEqual(dummy.HealthCurr, health - WarriorSpellFactory.CreateBloodLust().Value);
        }
示例#2
0
        public void MortalStrikeSpell_ShouldMakeDamage_WhenCasted()
        {
            IWarriorHero hero = ClassFactory.CreateWarrior("Grommash");

            hero.Power.PowerCurr = 100;
            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.MissChance = 0;
            double health = dummy.HealthCurr;

            hero.CastTo(WarriorSpellFactory.CreateMortalStrike(), dummy);

            Assert.AreEqual(dummy.HealthCurr, health - WarriorSpellFactory.CreateMortalStrike().Value);
        }
示例#3
0
        public void BloodLustSpell_ShouldGenerateRage_WhenCasted()
        {
            IWarriorHero hero   = ClassFactory.CreateWarrior("test");
            double       amount = hero.Power.PowerCurr;

            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.MissChance = 0;


            hero.CastTo(WarriorSpellFactory.CreateBloodLust(), dummy);


            Assert.AreNotEqual(amount, hero.Power.PowerCurr);
        }
示例#4
0
        public void CastToMethod_ShouldMakeDamage_WhenCalled()
        {
            //Arrange
            IWarriorHero attacker = ClassFactory.CreateWarrior("Grommash");
            IWarriorHero attacked = ClassFactory.CreateWarrior("Varian");

            attacked.MissChance = 0;
            double attackedHealth = attacked.HealthCurr;

            //Act
            attacker.CastTo(WarriorSpellFactory.CreateBloodLust(), attacked);

            //Assert
            Assert.AreNotEqual(attackedHealth, attacked.HealthCurr);
        }
示例#5
0
        public void MortalStrikeSpell_ShouldConsumeRage_WhenCasted()
        {
            IWarriorHero hero = ClassFactory.CreateWarrior("test");

            hero.Power.PowerCurr += 100;
            double amount = hero.Power.PowerCurr;

            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.MissChance = 0;


            hero.CastTo(WarriorSpellFactory.CreateMortalStrike(), dummy);


            Assert.AreNotEqual(amount, hero.Power.PowerCurr);
        }