Exemplo n.º 1
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.º 2
0
        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);
            }
        }