public void ShouldConvertCustomITextMessageToTextMessage() { var message = new TestTextMessage(); var textMessage = TextMessage.Convert(message); Assert.AreNotEqual(message, textMessage); Assert.AreEqual("TestTextMessage", textMessage.Text); }
public void Convert_CustomITextMessage_ConvertedToTextMessage() { TestTextMessage message = new TestTextMessage(); ISendMessage[] messages = MessageConverter.Convert(new ISendMessage[] { message }); Assert.AreEqual(1, messages.Length); Assert.AreNotEqual(message, messages[0]); TextMessage textMessage = messages[0] as TextMessage; Assert.AreEqual("TestTextMessage", textMessage.Text); }
public void ShouldConvertCustomITextMessageToTextMessage() { var message = new TestTextMessage(); var messages = MessageConverter.Convert(new ISendMessage[] { message }); Assert.AreEqual(1, messages.Length); Assert.AreNotEqual(message, messages[0]); var textMessage = messages[0] as TextMessage; Assert.AreEqual("TestTextMessage", textMessage.Text); }