コード例 #1
0
        public void MegamanTemMenosDe30DeVidaCausa9NoAtaque()
        {
            var megaman = new Megaman();
            var bot     = new Bot();

            megaman.ReceberAtaque(71);
            megaman.Atacar(bot);

            Assert.AreEqual(91, bot.Vida);
        }
コード例 #2
0
        public void MegamanToStringComMenosDe30DeVida()
        {
            var megaman = new Megaman();

            megaman.ReceberAtaque(71);

            Assert.AreEqual(
                "Vida: 29, Ataque: 6, Defesa: 0",
                megaman.ToString()
                );
        }
コード例 #3
0
        public void MegamanComCanhaoDePlasmaEMenosDe30DeVidaCausa11DeDano()
        {
            var megaman = new Megaman();
            var bot     = new Bot();

            megaman.EquiparUpgrade(new CanhaoDePlasma());
            megaman.ReceberAtaque(71);
            megaman.Atacar(bot);

            Assert.AreEqual(89, bot.Vida);
        }