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