public void SetUserFailedPasswordAnswerAttempt()
 {
     var userId = Guid.NewGuid();
       var resetDate = DateTime.Now;
       var command = new SetUserFailedPasswordAnswerAttempt(userId, 10, resetDate);
       Assert.AreEqual(userId, command.AggregateId);
       Assert.AreEqual(10, command.FailedPasswordAnswerAttemptCount);
       Assert.AreEqual(resetDate, command.FailedPasswordAnswerAttemptWindowStart);
 }
 public void HandleSetUserFailedPasswordAnswerAttempt()
 {
     var handler = GetHandler();
       var dateRef = DateTime.Now;
       var command = new SetUserFailedPasswordAnswerAttempt(guid, 5, dateRef);
       handler.Handle(command);
       Assert.AreEqual(guid, user.Id);
       Assert.AreEqual(5, user.FailedPasswordAnswerAttemptCount);
       Assert.AreEqual(dateRef, user.FailedPasswordAnswerAttemptWindowStart);
       repository.Verify(x => x.Save(user, It.IsAny<Guid>(), It.IsAny<Action<IDictionary<string, object>>>()), Times.Once());
 }