Пример #1
0
        public string successChangeMessageTest([PexAssumeUnderTest] DicBLL target, string sc)
        {
            string result = target.successChangeMessage(sc);

            return(result);
            // TODO: add assertions to method DicBLLTest.successChangeMessageTest(DicBLL, String)
        }
Пример #2
0
        public string successcreatsyllabusTest([PexAssumeUnderTest] DicBLL target, string sc)
        {
            string result = target.successcreatsyllabus(sc);

            return(result);
            // TODO: add assertions to method DicBLLTest.successcreatsyllabusTest(DicBLL, String)
        }
Пример #3
0
        private void btnAccountManagerSave_Click(object sender, EventArgs e)
        {
            LoginBLL lg     = new LoginBLL();
            DicBLL   dic    = new DicBLL();
            string   email  = txtAccountManagerEmail.Text;
            string   name   = txtname.Text;
            int      auth   = int.Parse(cboAccountManagerType.SelectedValue.ToString());
            bool     ad     = false;
            bool     active = false;

            if (checkboxActive.Checked == true)
            {
                active = true;
            }
            if (auth == 1)
            {
                ad = true;
            }

            if (idAc == "")
            {
                if (lg.isvaildEmail(email) == true)
                {
                    if (at.AddAccount(email, name, ad, active) == true)
                    {
                        MessageBox.Show(dic.successAccountMessage("add"));
                        clear();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dic.errorAccountMessage("else"));
                    }
                }
                else
                {
                    MessageBox.Show(dic.errorAccountMessage("sai email"));
                }
            }
            else
            {
                if (lg.isvaildEmail(email) == true)
                {
                    if (at.EditAccount(idAc, email, name, ad, active) == true)
                    {
                        MessageBox.Show(dic.successAccountMessage("edit"));
                        clear();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dic.errorAccountMessage("else"));
                    }
                }
                else
                {
                    MessageBox.Show(dic.errorAccountMessage("sai email"));
                }
            }
        }
Пример #4
0
        public string errorCreateProgramTest([PexAssumeUnderTest] DicBLL target, string er)
        {
            string result = target.errorCreateProgram(er);

            return(result);
            // TODO: add assertions to method DicBLLTest.errorCreateProgramTest(DicBLL, String)
        }
Пример #5
0
        public string defaultPassTest([PexAssumeUnderTest] DicBLL target)
        {
            string result = target.defaultPass();

            return(result);
            // TODO: add assertions to method DicBLLTest.defaultPassTest(DicBLL)
        }
Пример #6
0
        public string scheduleTest([PexAssumeUnderTest] DicBLL target, string mes)
        {
            string result = target.schedule(mes);

            return(result);
            // TODO: add assertions to method DicBLLTest.scheduleTest(DicBLL, String)
        }
Пример #7
0
        private void btnResetPass_Click(object sender, EventArgs e)
        {
            EncryptBLL encrypt = new EncryptBLL();
            LoginBLL   lg      = new LoginBLL();
            DicBLL     dic     = new DicBLL();
            ResetBLL   rs      = new ResetBLL();
            string     user    = txtResetPass.Text;
            string     pass    = encrypt.EncodeSHA1(dic.defaultPass());

            if (lg.isvaildEmail(user) == true)
            {
                if (lg.isvaildAccount(user) == true)
                {
                    if (rs.successUpdate(user, pass) == true)
                    {
                        MessageBox.Show(dic.successResetMessage());
                    }
                    else
                    {
                        MessageBox.Show(dic.errorResetMessage("error"));
                    }
                }
                else
                {
                    MessageBox.Show(dic.errorResetMessage("sai user"));
                }
            }
            else
            {
                MessageBox.Show(dic.errorResetMessage("sai email"));
            }
        }
Пример #8
0
        public string successResetMessageTest([PexAssumeUnderTest] DicBLL target)
        {
            string result = target.successResetMessage();

            return(result);
            // TODO: add assertions to method DicBLLTest.successResetMessageTest(DicBLL)
        }
Пример #9
0
        public string errorloginMessageTest([PexAssumeUnderTest] DicBLL target, string error)
        {
            string result = target.errorloginMessage(error);

            return(result);
            // TODO: add assertions to method DicBLLTest.errorloginMessageTest(DicBLL, String)
        }
Пример #10
0
        public string successupdateprogramTest([PexAssumeUnderTest] DicBLL target, string sc)
        {
            string result = target.successupdateprogram(sc);

            return(result);
            // TODO: add assertions to method DicBLLTest.successupdateprogramTest(DicBLL, String)
        }
        public void errorProOutTest198()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorProOutTest(s0, "else");
            Assert.AreEqual <string>("Lỗi kết nối.\v Vui lòng kiểm tra lại", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorProOutTest970()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorProOutTest(s0, (string)null);
            Assert.AreEqual <string>("No exception", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest249()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "翹ቒ");
            Assert.AreEqual <string>("No exception", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest594()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "success");
            Assert.AreEqual <string>("Lưu phương pháp giảng dạy môn học thành công.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest589()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "method");
            Assert.AreEqual <string>("phương pháp giảng dạy môn học bị trống.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest74()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "des");
            Assert.AreEqual <string>("Tỉ trọng phương pháp bị trống.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorChangeMessageTest210()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorChangeMessageTest(s0, "samename");
            Assert.AreEqual <string>("Họ và tên không thay đổi.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorProOutTest355()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorProOutTest(s0, "sameno");
            Assert.AreEqual <string>("Trùng số chuẩn đầu ra.\nVui lòng kiểm tra lại", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest126()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "per3");
            Assert.AreEqual <string>("Phần trăm phần thứ ba môn học bị trống.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorChangeMessageTest412()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorChangeMessageTest(s0, "wrongpass");
            Assert.AreEqual <string>("Mật khẩu cũ không đúng. \n Vui lòng kiểm tra lại.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errormethodTest750()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errormethodTest(s0, "part3");
            Assert.AreEqual <string>("Nội dung phần thứ ba môn học bị trống.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorAccountMessageTest185()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorAccountMessageTest(s0, "sai email");
            Assert.AreEqual <string>("Email không hợp lệ. \n Vui lòng kiểm tra lại", s);
            Assert.IsNotNull((object)s0);
        }
        public void defaultPassTest925()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.defaultPassTest(s0);
            Assert.AreEqual <string>("vanlang", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorAccountMessageTest421()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorAccountMessageTest(s0, (string)null);
            Assert.AreEqual <string>("No exception", s);
            Assert.IsNotNull((object)s0);
        }
Пример #25
0
        public void errorloginMessageTest896()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorloginMessageTest(s0, "sai pass");
            Assert.AreEqual <string>
                ("Bạn đã nhập sai mật khẩu. \n Vui lòng kiểm tra lại.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorAccountMessageTest844()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorAccountMessageTest(s0, "else");
            Assert.AreEqual <string>
                ("Lỗi kết nối.\n Vui lòng kiểm tra lại đường truyền mạng.", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorChangeMessageTest166()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorChangeMessageTest(s0, "confirm");
            Assert.AreEqual <string>
                ("Mật khẩu mới và Mật khẩu xác nhận không khớp.\n Vui lòng kiểm tra lại", s);
            Assert.IsNotNull((object)s0);
        }
        public void errorChangeMessageTest735()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorChangeMessageTest(s0, "samepass");
            Assert.AreEqual <string>
                ("Mật khẩu mới phải khác mật khẩu cũ.\n Vui lòng kiểm tra lại.", s);
            Assert.IsNotNull((object)s0);
        }
Пример #29
0
        public void errorloginMessageTest713()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorloginMessageTest(s0, "sai email");
            Assert.AreEqual <string>
                ("Bạn đã nhập sai tên đăng nhập. \n Vui lòng kiểm tra lại", s);
            Assert.IsNotNull((object)s0);
        }
Пример #30
0
        public void errorloginMessageTest176()
        {
            string s;
            DicBLL s0 = new DicBLL();

            s = this.errorloginMessageTest(s0, "chua active");
            Assert.AreEqual <string>
                ("Tài khoản của bạn chưa được kích hoạt. \n Vui lòng liên hệ người quản trị để kích hoạt",
                s);
            Assert.IsNotNull((object)s0);
        }