Ejemplo n.º 1
0
            public void ShouldConvertCustomIAudioMessageToAudioMessage()
            {
                var message = new TestAudioMessage();

                var audioMessage = AudioMessage.Convert(message);

                Assert.AreNotEqual(message, audioMessage);
                Assert.AreEqual(new Uri("https://foo.url"), audioMessage.Url);
                Assert.AreEqual(1000, audioMessage.Duration);
            }
        public void Convert_CustomIAudioMessage_ConvertedToAudioMessage()
        {
            TestAudioMessage message = new TestAudioMessage();

            ISendMessage[] messages = MessageConverter.Convert(new ISendMessage[] { message });

            Assert.AreEqual(1, messages.Length);
            Assert.AreNotEqual(message, messages[0]);

            AudioMessage audioMessage = messages[0] as AudioMessage;

            Assert.AreEqual(new Uri("https://foo.url"), audioMessage.Url);
            Assert.AreEqual(1000, audioMessage.Duration);
        }