private string ValidateAndGetFirstMessage()
 {
     return(CommandValidator.ValidationFailures(_registerAccountCommand).First().ErrorMessage);
 }
 public void IsInvalidIfEmailIsIncorrectFormat()
 {
     _registerAccountCommand.Email = "invalid";
     CommandValidator.ValidationFailures(_registerAccountCommand).Should().NotBeEmpty();
 }
 public void IsInvalidIfPasswordIsNull()
 {
     _registerAccountCommand.Password = null;
     CommandValidator.ValidationFailures(_registerAccountCommand).Should().NotBeEmpty();
 }
 public void IsInvalidifAccountIdIsEmpty()
 {
     _registerAccountCommand.AccountId = Guid.Empty;
     CommandValidator.ValidationFailures(_registerAccountCommand).Should().NotBeEmpty();
 }