Exemplo n.º 1
0
        public void matchEmail_Email_ReturnsTrue(string email)//Test mobile email id of the user
        {
            patternMatch obj = new patternMatch();
            //string email = "*****@*****.**";
            bool result = obj.matchEmail(email);

            Assert.AreEqual(true, result);
        }
Exemplo n.º 2
0
        public void matchFName_FirstName_ReturnsTrue()//Test first name of the user
        {
            patternMatch obj    = new patternMatch();
            string       fName  = "Firstname";
            bool         result = obj.matchFName(fName);

            Assert.AreEqual(true, result);
        }
Exemplo n.º 3
0
        public void matchPassword_Password_ReturnsTrue()//Test password of the user
        {
            patternMatch obj      = new patternMatch();
            string       password = "******";
            bool         result   = obj.matchPassword(password);

            Assert.AreEqual(true, result);
        }
Exemplo n.º 4
0
        public void matchEmail_Email_ThrowsCustomException(string email)//Test mobile email id of the user
        {
            patternMatch obj = new patternMatch();

            //string email = "*****@*****.**";
            try
            {
                bool checkEmail = obj.matchEmail(email);
            }
            catch (CustomException ce)
            {
                Assert.AreEqual("Invalid Email", ce.Message);
            }
        }
Exemplo n.º 5
0
        public void matchLName_LastName_ThrowsCustomException()//Test last name of the user
        {
            patternMatch obj   = new patternMatch();
            string       fName = "lastname";

            try
            {
                bool checkLName = obj.matchLName(fName);
            }
            catch (CustomException ce)
            {
                Assert.AreEqual("Invalid Last Name", ce.Message);
            }
        }
Exemplo n.º 6
0
        public void matchPassword_Password_ThrowsCustomException()//Test password of the user
        {
            patternMatch obj      = new patternMatch();
            string       password = "******";

            try
            {
                bool checkPassword = obj.matchPassword(password);
            }
            catch (CustomException ce)
            {
                Assert.AreEqual("Invalid Password", ce.Message);
            }
        }
Exemplo n.º 7
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);
            }
        }