public void MemeberShipService_IsValidUserNameAndPasswordNoUser()
        {
            _userRepository.Setup(e => e.FindUser(It.Is<string>(p => p == "test")));
            MemeberShipService memeberShipService = new MemeberShipService(_userRepository.Object);

            var result = memeberShipService.IsValidUserNameAndPassword("test", "hashedPassword");

            Assert.IsFalse(result);
            _userRepository.Verify(e => e.FindUser(It.Is<string>(p => p == "test")), Times.Once);
        }
        public void MemeberShipService_IsValidUserNameAndPasswordNullPassword()
        {
            MemeberShipService memeberShipService = new MemeberShipService(_userRepository.Object);

            var result = memeberShipService.IsValidUserNameAndPassword("test", null);

            Assert.IsFalse(result);
        }
        public void MemeberShipService_IsValidUserNameAndPassword()
        {
            _userRepository.Setup(e => e.FindUser(It.Is<string>(p => p == "test"))).Returns(new User { Password = "******" });
            MemeberShipService memeberShipService = new MemeberShipService(_userRepository.Object);

            var result = memeberShipService.IsValidUserNameAndPassword("test", "hashedPassword");

            Assert.IsTrue(result);
            _userRepository.Verify(e => e.FindUser(It.Is<string>(p => p == "test")), Times.Once);
        }