Пример #1
0
        public void MessagesNoFormatTest()
        {
            var messageFormater = new MessagesFormater();
            var message         = new MobilePhone.Messages.Messages("Test message!");

            var actualMessage = messageFormater.FormaterMethod(message);

            Assert.AreEqual(message, actualMessage);
        }
Пример #2
0
 private void OnMessageReceivedHandler(MobilePhone.Messages.Messages message)
 {
     if (this.messageslistView.InvokeRequired)
     {
         this.messageslistView.Invoke(new SMSReceivedDelegate(OnMessageReceivedHandler), message);
     }
     else
     {
         string[] row  = new string[] { message.User + message.Number, MessagesFormater.FormaterMethod(message).ToString() };
         var      item = new ListViewItem(row);
         messageslistView.Items.Add(item);
     }
 }
Пример #3
0
        public void MessagesUpperCaseTest()
        {
            var messageFormater = new MessagesFormater();

            messageFormater.FormaterMethod = messageFormater.UpperCaseFormat;

            var message = new MobilePhone.Messages.Messages("TEST MESSAGE");


            var actualMessage = messageFormater.FormaterMethod(new MobilePhone.Messages.Messages("Test message"));

            Assert.AreEqual(message.ToString(), actualMessage.ToString());
        }