Esempio n. 1
0
        private void CheckRegisterPasswordLength()
        {
            Account_Logic accountLogic = new Account_Logic();

            Assert.False(accountLogic.CheckRegisterPassword(new Account(1, "Bert", "12345", "*****@*****.**")));
            Assert.True(accountLogic.CheckRegisterPassword(new Account(2, "Bert", "123456", "*****@*****.**")));
        }
Esempio n. 2
0
        public void CheckLog_in()
        {
            // Arrange
            Account account = new Account(1, "Bert", "123456", "*****@*****.**");

            Assert.False(accountLogic.Log_in(account.Name, account.Password));

            // Act
            Assert.True(accountLogic.CheckRegisterData(account));
            Assert.True(accountLogic.CheckRegisterName(account));
            Assert.True(accountLogic.CheckRegisterPassword(account));

            // Assert
            Assert.True(accountLogic.Log_in(account.Name, account.Password));
        }
 public IActionResult Register(Account account)
 {
     logic.CheckRegisterPassword(account);
     return(RedirectToAction("Log_inpage"));
 }