public void ProbarNotificacion03()
        {
            var notificadorSimulado03 = new NotificarSimulado();

             var vigilanteTres = new InyeccionDependencia02Lib.Pruebas03.VigilanteAplicacion03();
             vigilanteTres.NotificadorActual = notificadorSimulado03;
             vigilanteTres.Notificar( "Probando[ VigilanteAplicacion03 ] desde[ ProbarNotificacion03 ]" );
        }
示例#2
0
        private void Prueba_03()
        {
            MensajeCentrado( "Prueba_03" );

             //Crear tres tipos distintos de notificadores
             var notificadorPorLog01          = new InyeccionDependencia02Lib.Pruebas01.NotificarALog();
             var notificadorPorCorreo01       = new InyeccionDependencia02Lib.Pruebas01.NotificarACorreo();
             var notificadorPorMensajeTexto01 = new InyeccionDependencia02Lib.Pruebas01.NotificarAMensajeTexto();

             var vigilanteUno = new InyeccionDependencia02Lib.Pruebas03.VigilanteAplicacion03();
             vigilanteUno.NotificadorActual = notificadorPorLog01;
             vigilanteUno.Notificar( "Vigilante Tres" );

             vigilanteUno.NotificadorActual = notificadorPorCorreo01;
             vigilanteUno.Notificar( "Vigilante Tres" );

             vigilanteUno.NotificadorActual = notificadorPorMensajeTexto01;
             vigilanteUno.Notificar( "Vigilante Tres" );
        }