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; } }
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)); }
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)); }