public void NoFormat()
        {
            MessageFormatter messageFormatter = new MessageFormatter();
            Message          message          = new Message("Ivan", "This is test", DateTime.Now);

            Message result = messageFormatter.FormatMethod(message);

            Assert.AreEqual(new Message("Ivan", "This is test\r\n", message.ReceivingTime), result);
        }
        public void LowerCaseFormat()
        {
            var messageFormatter = new MessageFormatter();

            messageFormatter.FormatMethod = messageFormatter.LowerCaseFormat;
            Message message = new Message("Ivan", "This is test", DateTime.Now);

            var result = messageFormatter.FormatMethod(message);

            Assert.AreEqual(new Message("Ivan", "this is test" + Environment.NewLine, message.ReceivingTime), result);
        }
 private void OnSMSReceived(ClassLibraryPhone.Messages.Message message)
 {
     if (MessageListView.InvokeRequired)
     {
         MessageListView.Invoke(new SMSReceivedDelegate(OnSMSReceived), message);
     }
     else
     {
         ListOfMessages.Add(Formatter.FormatMethod(message));
         ShowMessage(ListOfMessages);
     }
 }