Example #1
0
        public void GivenAUserId_WhenITryToUpdateTheFailedLoginCount_TheFailedLogInCountIsIncremented()
        {
            ApplicationUser user = BuildMeA.ApplicationUser("usertron");

            _applicationUserRepository.Create(user);

            int initialCount = user.FailedLogInCount;

            _applicationUserRepository.UpdateUserFailedLogin(user.Id);

            var result = _applicationUserRepository.GetUserByName(user.UserName);

            result.FailedLogInCount.Should().Be(initialCount + 1);
        }