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()); }
public void SendAlert_SetMessengerToWeb_ReturnsCellularObject() { var securityService = new UACSecurity.Classes.SecurityServices(); securityService.SetAlertMessenger(new AlertMessengerWeb()); Assert.Equal("Sending a Web Alert message ...", securityService.SendAlert()); }
public void SetAlertMessenger_WhenParamIsNull_ThrowsArgNullException() { var securityService = new UACSecurity.Classes.SecurityServices(); Assert.Throws <ArgumentNullException>(() => securityService.SetAlertMessenger(null)); }