Пример #1
0
        public void LogIn(string username, string password)
        {
            // Check if the given password checks against the stored password.
            _currentUser = _userManagement.LogIn(username, password) ??
                           throw new Exception("Username or Password invalid");

            // Update the last accessed date time
            _currentUser.LastAccessed = DateTime.Now;
            _userManagement.UpdateUser(_currentUser);
        }
 public void UserManagement_Should_Be_Created_With_An_Admin_Account()
 {
     Assert.NotNull(_userManagement.LogIn("admin", "admin"));
     _dbManager.Dispose();
 }