static void Main(string[] args) { IEventNotifier notifier = new SmsNotifier(); notifier.Notify(); Console.ReadLine(); }
public void Notify_SMSNotifier() { //This is the refactored implementation that follows the DIP. We will plug in a notifier that we want on the UserManager var mySmSNotifier = new SmsNotifier(); var myUserManager = new UserManager(mySmSNotifier); var output = myUserManager.CreateUser("1", "testpassword", "*****@*****.**"); Assert.AreEqual(output, "SMS Notifier: User created successfully!"); }
public void TestDecorator() { Notifier notifier = new UserNotifier(); notifier = new SmsNotifier(notifier); notifier.Send(); Console.WriteLine("\n"); notifier = new InternetBankingNotifier(notifier); notifier.Send(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SmsNotifier sm = new SmsNotifier(false); // sm.AddGroup("test"); // sm.AddSubscription("14184553547", "test"); sm.SendSms("test", "Ce message sera envoyé à trois numéros différents! It works!"); //Application.Run(new Form1()); }
private void ProcessSmsNotification() { SmsNotifier smsNotifier = new SmsNotifier(_baseParametersProvider); smsNotifier.NotifyUndeliveryAutoTransferNotApproved(UndeliveredOrder); }
/// <summary> /// /// </summary> public void SendSmsWarning() { var smsNotifier = new SmsNotifier(); _notificationsService.SendWarning(smsNotifier); }
public void Init() { target = new SmsNotifier(); validator = new SmsNotifierValidator(); }
private void ProcessSmsNotification() { var smsNotifier = new SmsNotifier(_smsNotifierParametersProvider); smsNotifier.NotifyUndeliveryAutoTransferNotApproved(undelivery, UoW); }