예제 #1
0
        public void TratarDeSeguirDaniandoACecilioDestruidoLanceUnaExcepcion()
        {
            Cecilio cecilio = new Cecilio();
            ToleTole toleTole = new ToleTole();
            cecilio.DaniarConToleTole(toleTole); //Ya lo destruyo

            Assert.Throws<EntidadYaDestruidaException>(() => cecilio.DaniarConToleTole(toleTole));
        }
예제 #2
0
        public void QueCecilioSeaDañandoPorUnaToleToleLeQuiteUnaVida()
        {
            Cecilio cecilio = new Cecilio();

            ToleTole toleTole = new ToleTole();

            cecilio.DaniarConToleTole(toleTole);

            Assert.IsTrue(cecilio.FueDestruido());
        }