Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            var securityServices = new UACSecurity.Classes.SecurityServices();

            securityServices.SetAlertMessenger(new AlertMessengerSms());
            Console.WriteLine(securityServices.SendAlert());
            securityServices.SetAlertMessenger(new AlertMessengerCellular());
            Console.WriteLine(securityServices.SendAlert());
        }
Ejemplo n.º 2
0
        public void SendAlert_SetMessengerToWeb_ReturnsCellularObject()
        {
            var securityService = new UACSecurity.Classes.SecurityServices();

            securityService.SetAlertMessenger(new AlertMessengerWeb());
            Assert.Equal("Sending a Web Alert message ...", securityService.SendAlert());
        }
Ejemplo n.º 3
0
        public void SetAlertMessenger_WhenParamIsNull_ThrowsArgNullException()
        {
            var securityService = new UACSecurity.Classes.SecurityServices();

            Assert.Throws <ArgumentNullException>(() => securityService.SetAlertMessenger(null));
        }