Example #1
0
        [Test] // Orc against MonsterCard -> expect Dmg stays the same
        public void CalcDamage_AgainstMonsterCard_ReturnsInt()
        {
            //Arrange
            Orc justOrc     = new Orc();
            Orc eviljustOrc = new Orc();
            //Act
            int justOrcDamage = justOrc.CalcDamage(eviljustOrc);

            //Assert
            Assert.AreEqual(justOrcDamage, justOrc.Damage);
        }
Example #2
0
        [Test] // Orc against NORMAL Spell -> expect Dmg stays the same
        public void CalcDamage_AgainstNormalSpell_ReturnsInt()
        {
            //Arrange
            Orc         justOrc    = new Orc();
            NormalSpell enemySpell = new NormalSpell();
            //Act
            int justOrcDamage  = justOrc.CalcDamage(enemySpell);
            int expectedDamage = 8;

            //Assert
            Assert.AreEqual(expectedDamage, justOrcDamage);
        }
Example #3
0
        [Test] // Enemy Wizzard against Orc -> expect 0 Dmg
        public void CalcEnemyDamage_AgainstOrc_ReturnsInt()
        {
            //Arrange
            Orc     justOrc = new Orc();
            Wizzard wiz     = new Wizzard();
            //Act
            int justOrcDamage  = justOrc.CalcDamage(wiz);
            int expectedDamage = 0;

            //Assert
            Assert.AreEqual(expectedDamage, justOrcDamage);
        }