Esempio n. 1
0
        public void RaiseFormatMessageEventTestMessageDataTimeFormat()
        {
            var    sms                 = new SMSProvider();
            var    mock_rec            = new MockReceiver();
            var    MessageDataTimeFunc = sms.FormatingFunc[(int)SMSProvider.FormatedMode.MessageDataTime];
            string inmessage           = "Hellow World!!!";

            mock_rec.OnSmsReseivedFormatedMsg(inmessage, MessageDataTimeFunc);

            Assert.AreEqual(mock_rec.Message, $"Hellow World!!! [{sms.DataTimeAttachment}]");
        }
Esempio n. 2
0
        public void RaiseFormatMessageEventTestUppercaseFormat()
        {
            var    sms           = new SMSProvider();
            var    mock_rec      = new MockReceiver();
            var    UpperCaseFunc = sms.FormatingFunc[(int)SMSProvider.FormatedMode.UpperCase];
            string inmessage     = "hellow world!!!";

            mock_rec.OnSmsReseivedFormatedMsg(inmessage, UpperCaseFunc);

            Assert.AreEqual(mock_rec.Message, $"HELLOW WORLD!!!");
        }
Esempio n. 3
0
        public void RaiseFormatMessageEventTestNonFormat()
        {
            var    sms            = new SMSProvider();
            var    mock_rec       = new MockReceiver();
            var    NoneFormatFunc = sms.FormatingFunc[(int)SMSProvider.FormatedMode.NoneFormat];
            string inmessage      = "Hellow World!!!";

            mock_rec.OnSmsReseivedFormatedMsg(inmessage, NoneFormatFunc);

            Assert.AreEqual(mock_rec.Message, "Hellow World!!!");
        }