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 matchFName_FirstName_ThrowsCustomException()//Test first name of the user { patternMatch obj = new patternMatch(); string fName = "firstname"; try { bool checkFName = obj.matchFName(fName); } catch (CustomException ce) { Assert.AreEqual("Invalid First Name", ce.Message); } }