Esempio n. 1
0
        public void ValidEmailUnique()
        {
            string[]     validEmails = { "*****@*****.**", "*****@*****.**", "*****@*****.**" };
            formAdd_Edit form        = new formAdd_Edit(ListCustomer);
            bool         emailUnique = true;

            foreach (string email in validEmails)
            {
                if (!form.checkEmailUnique(ListCustomer, email, 2))
                {
                    emailUnique = false;
                    break;
                }
            }
            Assert.IsTrue(emailUnique);
        }
Esempio n. 2
0
        public void InvalidEmailUnique()
        {
            string[]     invalidEmails = { "*****@*****.**", "*****@*****.**" };
            formAdd_Edit form          = new formAdd_Edit(ListCustomer);
            bool         emailUnique   = false;

            foreach (string email in invalidEmails)
            {
                if (form.checkEmailUnique(ListCustomer, email, 2))
                {
                    emailUnique = true;
                    break;
                }
            }
            Assert.IsFalse(emailUnique);
        }