Пример #1
0
        public void matchMobile_Mobile_ReturnsTrue()//Test mobile phone number of the user
        {
            patternMatch obj    = new patternMatch();
            string       mobile = "91 7894561230";
            bool         result = obj.matchMobile(mobile);

            Assert.AreEqual(true, result);
        }
Пример #2
0
        public void matchMobile_Mobile_ThrowsCustomException()//Test mobile phone number of the user
        {
            patternMatch obj    = new patternMatch();
            string       mobile = "91 0894561230";

            try
            {
                bool checkMobile = obj.matchMobile(mobile);
            }
            catch (CustomException ce)
            {
                Assert.AreEqual("Invalid Mobile Number", ce.Message);
            }
        }