Ejemplo 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);
        }
Ejemplo n.º 2
0
        public void ValidEmailOk()
        {
            string[]     validEmail = { "*****@*****.**", "*****@*****.**", "*****@*****.**" };
            formAdd_Edit form       = new formAdd_Edit(ListCustomer);
            bool         emailOK    = true;

            foreach (string email in validEmail)
            {
                if (!Customer.eMailOK(email))
                {
                    emailOK = false;
                    break;
                }
            }
            Assert.IsTrue(emailOK);
        }
Ejemplo n.º 3
0
        public void InvalidEmailOk()
        {
            string[]     invalidEmail = { "[email protected]", "schimpi@gmail", "[email protected]" };
            formAdd_Edit form         = new formAdd_Edit(ListCustomer);
            bool         emailOk      = false;

            foreach (string email in invalidEmail)
            {
                if (Customer.eMailOK(email))
                {
                    emailOk = true;
                    break;
                }
            }
            Assert.IsFalse(emailOk);
        }
Ejemplo n.º 4
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);
        }