コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: cmd-coder/URP
        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);
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: cmd-coder/URP
        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);
            }
        }