Ejemplo n.º 1
0
        public void PowerGenerateMethod_ShouldGenerateAmountOfRagePower_WhenCalled()
        {
            IPower ragePower = PowerFactory.CreateRagePower();
            ISpell spell     = WarriorSpellFactory.CreateBloodLust();

            ragePower.PowerGenerate(spell);

            Assert.AreNotEqual(ragePower.PowerCurr, 0);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }