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