public void MessagesNoFormatTest() { var messageFormater = new MessagesFormater(); var message = new MobilePhone.Messages.Messages("Test message!"); var actualMessage = messageFormater.FormaterMethod(message); Assert.AreEqual(message, actualMessage); }
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); } }
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()); }