public void TestGetByEMail() { // arrange User user = new User("*****@*****.**", "0ce16c9bcd892e45e837ac27ff9b5339c16a1b9e"); string useremail = "*****@*****.**"; string userpwd = "0ce16c9bcd892e45e837ac27ff9b5339c16a1b9e"; // act User loadedUser = uDao.GetByEMail("*****@*****.**"); // assert Assert.AreEqual(user.PasswordHash, loadedUser.PasswordHash); Assert.AreEqual(user.EMail, loadedUser.EMail); Assert.AreEqual($"User: E-Mail: {useremail,20} | Password: {userpwd,30} | ", loadedUser.ToString()); }
public UserVM(User user) { this.user = user; }
public void Login(User user) { authenticatedUser = user; }
public void Logout(User user) { authenticatedUser = null; }
public bool IsAuthenticated(User user) { return authenticatedUser != null; }