Exemple #1
0
        public void Hydra_TakeDamageTwoTimesNotEnoughDamageToGrowAHead()
        {
            hydra.TakeDamage(5, damageNonFire.Object, attacker1.Object);

            Assert.AreEqual(0, (int)newHeadsToGrow.GetValue(hydra));
            Assert.IsFalse((bool)tookFireDamage.GetValue(hydra));
            Assert.AreEqual(5, hydra.EquipedWeapon.Count());
            RoundOfDamage rndOfDamage = (RoundOfDamage)roundOfDamage.GetValue(hydra);

            Assert.AreEqual(5, rndOfDamage.TotalDamage);
            Assert.AreEqual(attacker1.Object, rndOfDamage.LastAttacker);
            Assert.AreEqual(0u, rndOfDamage.CombatRound);
            Assert.IsFalse(rndOfDamage.HeadCut);


            hydra.TakeDamage(5, damageNonFire.Object, attacker2.Object);

            Assert.AreEqual(0, (int)newHeadsToGrow.GetValue(hydra));
            Assert.IsFalse((bool)tookFireDamage.GetValue(hydra));
            Assert.AreEqual(5, hydra.EquipedWeapon.Count());
            RoundOfDamage rndOfDamage2 = (RoundOfDamage)roundOfDamage.GetValue(hydra);

            Assert.AreEqual(5, rndOfDamage2.TotalDamage);
            Assert.AreEqual(attacker2.Object, rndOfDamage2.LastAttacker);
            Assert.AreEqual(0u, rndOfDamage2.CombatRound);
            Assert.IsFalse(rndOfDamage2.HeadCut);
            Assert.AreNotSame(rndOfDamage, rndOfDamage2);
        }