Пример #1
0
        public void matchLName_LastName_ReturnsTrue()//Test last name of the user
        {
            patternMatch obj    = new patternMatch();
            string       fName  = "Lastname";
            bool         result = obj.matchLName(fName);

            Assert.AreEqual(true, result);
        }
Пример #2
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);
            }
        }