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); }
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); }
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); }
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); } }
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); } }
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); } }
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); } }