public bool IsSecredUserIdValid(SecretUserId secretUserId)
        {
            if (secretUserId == null) return false;

            UserManager userManager = new UserManager(this.Context);
            User user = userManager.GetUserByUserId(secretUserId.UserId);

            if (user == null)
            {
                return false;
            }

            bool isValid = user.UserSecret == secretUserId.Secret;
            return isValid;
        }
        public void GetUserByValidUserIdTest()
        {
            // act
            Guid userId = Guid.NewGuid();

            _userRepositoryMock.Setup(x => x.Get(userId, null)).Returns(new User());
            var userManager = new UserManager(_userRepositoryMock.Object);

            // actual
            var actual = userManager.GetUserByUserId(userId, true);

            // assert
            Assert.IsNotNull(actual);
        }
        public void GetUserByInvalidUserIdTest()
        {
            // act
            _userRepositoryMock.Setup(x => x.Get(null, null)).Returns((User)null);
            var userManager = new UserManager(_userRepositoryMock.Object);

            // actual
            var actual = userManager.GetUserByUserId(Guid.Empty, true);

            // assert
            // never reached
        }