public void ChageUserPassword()
 {
     var guid = Guid.NewGuid();
       var date = DateTime.Now;
       var command = new ChangeUserPassword(guid, "abc", date);
       Assert.AreEqual(guid, command.AggregateId);
       Assert.AreEqual("abc", command.NewPassword);
       Assert.AreEqual(date, command.LastPasswordChangedDate);
 }
 public void HandleChangeUserPassword()
 {
     var handler = GetHandler();
       var dateRef = DateTime.Now;
       var command = new ChangeUserPassword(guid, "newpwd", dateRef);
       handler.Handle(command);
       Assert.AreEqual(guid, user.Id);
       Assert.AreEqual("newpwd", user.Password);
       Assert.AreEqual(dateRef, user.LastPasswordChangedDate);
       repository.Verify(x => x.Save(user, It.IsAny<Guid>(), It.IsAny<Action<IDictionary<string, object>>>()), Times.Once());
 }