Ejemplo n.º 1
0
        public void ShouldDealLessOrEqualToTwentyDamage()
        {
            IPokemon attackingPokemon = PokemonFactory.CreatePokemon <Pikachu>();
            IPokemon targetPokemon    = PokemonFactory.CreatePokemon <Onix>();

            TypeEffect effectOfTypeOnTargetPokemon = TypeComparer.CompareElectricType(targetPokemon.Types[0]);

            int totalDamage = TypeDamageCalculator.CalculateDamage(
                attackingPokemon,
                targetPokemon,
                attackingPokemon.Moves[1],
                effectOfTypeOnTargetPokemon
                );

            Assert.True(totalDamage <= 20);

            totalDamage = TypeDamageCalculator.CalculateDamage(
                attackingPokemon,
                targetPokemon,
                attackingPokemon.Moves[2],
                effectOfTypeOnTargetPokemon
                );

            Assert.True(totalDamage <= 20);
        }