public void PruebaQueElEfectoDelBombaToleToleLeDureHastaQueMuera()
        {
            BombaToleTole articulo = new BombaToleTole();
            Bombita bombita = new Bombita();
            Assert.IsInstanceOf<Molotov>(bombita.Bomba);

            bombita.AgarrarArticulo(articulo);
            Assert.IsInstanceOf<ToleTole>(bombita.Bomba);

            bombita.DaniarConToleTole(new ToleTole());

            Assert.IsInstanceOf<Molotov>(bombita.Bomba);
        }
        public void PruebaQueElEfectoDelHabanoLeDureHastaQueMuera()
        {
            Habano articulo = new Habano();
            Bombita bombita = new Bombita();
            int velocidadInicial = bombita.Velocidad;

            bombita.AgarrarArticulo(articulo);
            int velocidadIntermedia = bombita.Velocidad;

            bombita.DaniarConToleTole(new ToleTole());
            int velocidadFinal = bombita.Velocidad;

            Assert.AreEqual(velocidadInicial, velocidadFinal);
            Assert.Greater(velocidadIntermedia, velocidadInicial);
            Assert.Greater(velocidadIntermedia, velocidadFinal);
        }
        public void TratarDeSeguirDaniandoAUnBombitaDestruidoLanceUnaExcepcion()
        {
            Bombita bombita = new Bombita();
            ToleTole toleTole = new ToleTole();

            for (int i = 0; i < 3; i++)
            {
                bombita.DaniarConToleTole(toleTole);
            }

            Assert.Throws<EntidadYaDestruidaException>(() => bombita.DaniarConToleTole(toleTole));
        }
        public void QueBombitaSeaDaƱandoPorUnaToleToleLeQuiteUnaVida()
        {
            Bombita bombita = new Bombita();

            ToleTole toleTole = new ToleTole();

            bombita.DaniarConToleTole(toleTole);

            Assert.Less(bombita.Vidas, 3);
        }
        public void QueABombitaNoLeQuedenMasVidasYQueEsteDestruido()
        {
            Bombita bombita = new Bombita();
            ToleTole toleTole = new ToleTole();

            for (int i = 0; i < 3; i++)
            {
                bombita.DaniarConToleTole(toleTole);
            }

            Assert.IsTrue(bombita.FueDestruido());
        }
        public void PruebaQueElEfectoDelTimerLeDureHastaQueMuera()
        {
            Timer articulo = new Timer();
            Bombita bombita = new Bombita();
            Assert.AreEqual(1,bombita.PorcentajeDeRetardo);

            bombita.AgarrarArticulo(articulo);
            Assert.AreEqual(0.85, bombita.PorcentajeDeRetardo);

            bombita.DaniarConToleTole(new ToleTole());

            Assert.AreEqual(1, bombita.PorcentajeDeRetardo);
        }