public bool ChangePassword(PasswordDto user)
 {
     try
     {
         return(UserLoginBrl.ChangePassword(user, dbContext));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool Login(UserDto user)
 {
     try
     {
         return(UserLoginBrl.Login(user, dbContext));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
        public void TestChangePassword()
        {
            UserDto currentUser = new UserDto()
            {
                Email    = "*****@*****.**",
                Password = new PasswordDto()
                {
                    Psw = "hola"
                },
                UserId = 50
            };

            UserBrl.Insert(currentUser, container);

            PasswordDto user = new PasswordDto()
            {
                PasswordId  = 50,
                NewPassword = "******",
                Psw         = "hola"
            };

            Assert.Equals(true, UserLoginBrl.ChangePassword(user, container));
        }
예제 #4
0
        public void TestLogin()
        {
            UserDto user = new UserDto()
            {
                Email    = "*****@*****.**",
                Password = new PasswordDto()
                {
                    Psw = "hola"
                }
            };
            UserDto currentUser = new UserDto()
            {
                Email    = "*****@*****.**",
                Password = new PasswordDto()
                {
                    Psw = "hola"
                }
            };

            UserBrl.Insert(currentUser, container);

            Assert.Equals(true, UserLoginBrl.Login(user, container));
        }