Пример #1
0
        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());
        }
Пример #2
0
 public UserVM(User user)
 {
     this.user = user;
 }
Пример #3
0
 public void Login(User user)
 {
     authenticatedUser = user;
 }
Пример #4
0
 public void Logout(User user)
 {
     authenticatedUser = null;
 }
Пример #5
0
 public bool IsAuthenticated(User user)
 {
     return authenticatedUser != null;
 }