public void LockUser()
 {
     var userId = Guid.NewGuid();
       var resetDate = DateTime.Now;
       var command = new LockUser(userId, resetDate);
       Assert.AreEqual(userId, command.AggregateId);
       Assert.IsTrue(command.IsLockedOut);
       Assert.AreEqual(resetDate, command.LastLockedOutDate);
 }
 public void HandleLockUser()
 {
     var handler = GetHandler();
       var dateRef = DateTime.Now;
       var command = new LockUser(guid, dateRef);
       handler.Handle(command);
       Assert.AreEqual(guid, user.Id);
       Assert.AreEqual(dateRef, user.LastLockedOutDate);
       Assert.IsTrue(user.IsLockedOut);
       repository.Verify(x => x.Save(user, It.IsAny<Guid>(), It.IsAny<Action<IDictionary<string, object>>>()), Times.Once());
 }