Пример #1
0
        public void EarthUpgradeIncreasesEarthDamage()
        {
            IDragon dragon = new Dragon();

            Assert.AreEqual(1, dragon.FireDamage);
            Assert.AreEqual(1, dragon.WaterDamage);
            Assert.AreEqual(1, dragon.EarthDamage);
            Assert.AreEqual(1, dragon.WindDamage);

            dragon = new DragonEarthUpgrade(dragon);

            Assert.AreEqual(1, dragon.FireDamage);
            Assert.AreEqual(1, dragon.WaterDamage);
            Assert.AreEqual(11, dragon.EarthDamage);
            Assert.AreEqual(1, dragon.WindDamage);
        }
Пример #2
0
        public void UpgradeStacks()
        {
            IDragon dragon = new Dragon();

            Assert.AreEqual(1, dragon.FireDamage);
            Assert.AreEqual(1, dragon.WaterDamage);
            Assert.AreEqual(1, dragon.EarthDamage);
            Assert.AreEqual(1, dragon.WindDamage);

            dragon = new DragonFireUpgrade(dragon);
            dragon = new DragonFireUpgrade(dragon);
            dragon = new DragonWaterUpgrade(dragon);
            dragon = new DragonEarthUpgrade(dragon);
            dragon = new DragonWindUpgrade(dragon);

            Assert.AreEqual(21, dragon.FireDamage);
            Assert.AreEqual(11, dragon.WaterDamage);
            Assert.AreEqual(11, dragon.EarthDamage);
            Assert.AreEqual(11, dragon.WindDamage);
        }