Пример #1
0
        public void EvenMonitorPrinting_PrintingEven_SuscripcionSinErrorEventosImpresion()
        {
            /// Inicialización (Arrange)
            ///  - No es necesaria inicialización

            /// Ejecución (Act)
            /// - Suscripción a los eventos de impresión con el método PrintingEven()
            EventMonitorPrinting.PrintingEven();

            /// Comprobación (Assert)
            /// - Comprobar si estamos suscritos a los eventos de Impresión.
            Assert.IsTrue(EventMonitorPrinting.IsEventSigned);
            /// - Comprobar que el evento capturado es el de control.
            Assert.IsTrue(EventMonitorPrinting.CurrentEvent == EventMonitorPrinting.IdEvenControl);
        }
Пример #2
0
        public void EvenMonitorPrinting_IsAliveEvent_CompruebaSeEstanCapturandoEventosImpresion()
        {
            /// Inicialización (Arrange)
            /// - Suscripción a los eventos de impresión
            EventMonitorPrinting.PrintingEven();

            /// Ejecución (Act)
            /// - Se lanza el Evento de control: IsAliveEvents()
            object    iSender = new object();
            EventArgs iArgs   = new EventArgs();

            EventMonitorPrinting.IsAliveEvents(iSender, iArgs);

            /// Comprobación (Assert)
            /// - Al suscribir a los eventos de impresión el úlitmo evento de impresión es el evento de control (el generado por el método)
            Assert.IsTrue(EventMonitorPrinting.CurrentEvent == EventMonitorPrinting.IdEvenControl);
        }