Пример #1
0
        public void WhenValidSMSReturnNoErrors()
        {
            string messageBody = "00447894561231\r\n" +
                                 "Saw your message ROTFL can’t wait to see you \r\n";

            SMSProcessMessage sms    = new SMSProcessMessage();
            List <string>     errors = new List <string>();
            int expectedErrors       = 0;

            errors = sms.RunValidation(messageBody);
            int errorsCount = errors.Count;

            Assert.AreEqual(expectedErrors, errorsCount);
        }
Пример #2
0
        public void WhenInvalidSMSNumberReturnError()
        {
            string messageBody = "07894561231 \r\n" +
                                 "Saw your message ROTFL can’t wait to see you \r\n";

            SMSProcessMessage sms            = new SMSProcessMessage();
            List <string>     errors         = new List <string>();
            List <string>     expectedErrors = new List <string>();

            expectedErrors.Add("Invalid phone number");

            errors = sms.RunValidation(messageBody);

            Assert.AreEqual(expectedErrors[0], errors[0]);
        }