Example #1
0
        [Test] // Goblin against Dragon -> 0 Damage
        public void CalcDamage_AgainstDragon_ReturnsInt()
        {
            //Arrange
            Goblin gobo  = new Goblin();
            Dragon smaug = new Dragon();
            //Act
            int goboDamage = gobo.CalcDamage(smaug);

            //Assert
            Assert.AreEqual(0, goboDamage);
        }
Example #2
0
        [Test] // Goblin against MonsterCard -> expect Dmg stays the same
        public void CalcDamage_AgainstMonsterCard_ReturnsInt()
        {
            //Arrange
            Goblin gobo = new Goblin();
            Goblin obog = new Goblin();
            //Act
            int goboDamage = gobo.CalcDamage(obog);

            //Assert
            Assert.AreEqual(goboDamage, gobo.Damage);
        }
Example #3
0
        [Test] // Goblin against NORMAL Spell -> expect Dmg stays the same
        public void CalcDamage_AgainstNormalSpell_ReturnsInt()
        {
            //Arrange
            Goblin      gobo       = new Goblin();
            NormalSpell enemySpell = new NormalSpell();
            //Act
            int goboDamage     = gobo.CalcDamage(enemySpell);
            int expectedDamage = 5;

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