コード例 #1
0
        public void Use_Should_Use_Mana(int manaCost, int damage)
        {
            var sut         = new DamageCard(manaCost, damage);
            int initialMana = _playerOne.Mana;

            sut.Use(_playerOne, _playerTwo);

            int usedMana = initialMana - _playerOne.Mana;

            Assert.Equal(manaCost, usedMana);
        }
コード例 #2
0
        public void Use_Should_Damage_Opponent(int manaCost, int damage)
        {
            var sut           = new DamageCard(manaCost, damage);
            int initialHealth = _playerTwo.Health;

            sut.Use(_playerOne, _playerTwo);

            int receivedDamage = initialHealth - _playerTwo.Health;

            Assert.Equal(damage, receivedDamage);
        }