Exemplo n.º 1
0
        public int ChangePassWordTest(
            [PexAssumeUnderTest] BusinessPlayer target,
            string user,
            string oldPass,
            string nPass
            )
        {
            int result = target.ChangePassWord(user, oldPass, nPass);

            return(result);
            // TODO: add assertions to method BusinessPlayerTest.ChangePassWordTest(BusinessPlayer, String, String, String)
        }
Exemplo n.º 2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (txtPass.Text.Equals("") || txtPass.Text.Length < 6)
            {
                MessageBox.Show("Vui lòng nhập mật khẩu ít nhất 6 kí tự!");
                return;
            }

            if (business.ChangePassWord(Login.UserName, Login.Password, txtPass.Text) > 0)
            {
                MessageBox.Show("Đổi mật khẩu thành công!");
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("Đổi mật khẩu thất bại!");
                this.DialogResult = DialogResult.No;
            }
            this.Close();
        }