public void SendMessageWithEmail(string message, SenderEventHandlerArgs args)
 {
     Console.WriteLine("Email this message {0}", message);
     //sending message with email
     args.IsEmailSent = true;
     SenderEvent(this, args);
 }
 public void SendMessageWithSms(string message, SenderEventHandlerArgs args)
 {
     Console.WriteLine("Sms this mesksage {0}", message);
     //sending message with Sms
     args.IsSmsSent = true;
     SenderEvent(this, args);
 }
Exemplo n.º 3
0
 public void SendMessageWithSms(string message, SenderEventHandlerArgs args)
 {
     Console.WriteLine("Sms this mesksage {0}", message);
     //sending message with Sms
     args.IsSmsSent = true;
     SenderEvent(this, args);
 }
Exemplo n.º 4
0
 public void SendMessageWithEmail(string message, SenderEventHandlerArgs args)
 {
     Console.WriteLine("Email this message {0}", message);
     //sending message with email
     args.IsEmailSent = true;
     SenderEvent(this, args);
 }
        public void Given_Message_When_SendCommunication_Then_ShouldSendWithSmsAndEmail()
        {
            var tellDontAsk = new TellDontAsk();

            tellDontAsk.RegisterCommunication(new Message());
            var senderEventHandlerArgs = new SenderEventHandlerArgs {
                IsEmailSent = false, IsSmsSent = false
            };

            tellDontAsk.SendMessage("test message", senderEventHandlerArgs);
            Assert.IsTrue(senderEventHandlerArgs.IsEmailSent);
            Assert.IsTrue(senderEventHandlerArgs.IsSmsSent);
        }
 public void SendMessage(string textMessage, SenderEventHandlerArgs args)
 {
     _sender(textMessage, args);
 }
Exemplo n.º 7
0
 public void Given_Message_When_SendCommunication_Then_ShouldSendWithSmsAndEmail()
 {
     var tellDontAsk = new TellDontAsk();
     tellDontAsk.RegisterCommunication(new Message());
     var senderEventHandlerArgs = new SenderEventHandlerArgs { IsEmailSent = false, IsSmsSent = false };
     tellDontAsk.SendMessage("test message", senderEventHandlerArgs);
     Assert.IsTrue(senderEventHandlerArgs.IsEmailSent);
     Assert.IsTrue(senderEventHandlerArgs.IsSmsSent);
 }
Exemplo n.º 8
0
 public void SendMessage(string textMessage, SenderEventHandlerArgs args)
 {
     _sender(textMessage, args);
 }