public void EmailIsValid_ShouldNotHaveError()
        {
            _command = new InitSigningUpCommand {
                Email = "*****@*****.**"
            };

            _sut.ShouldNotHaveValidationErrorFor(x => x.Email, _command);
        }
        public void EmailIsNullOrEmptyOrInvalid_ShouldHaveError(string email)
        {
            _command = new InitSigningUpCommand {
                Email = email
            };

            _sut.ShouldHaveValidationErrorFor(x => x.Email, _command);
        }
        public void SetUp()
        {
            _service    = new Mock <IInitOrganizationSigningUpService>();
            _unitOfWork = new Mock <IUnitOfWork>();
            _mediator   = new Mock <IMediator>();
            _command    = new InitSigningUpCommand {
                Email = "*****@*****.**"
            };
            _sut = new InitSigningUpCommandHandler(_service.Object, _unitOfWork.Object, _mediator.Object);

            _signingUp = new OrganizationSigningUp(_command.Email, "token");
            _service.Setup(x => x.InitOrganizationSigningUp(_command.Email)).Returns(_signingUp);
        }
        public async Task <ActionResult> InitSigningUp(InitSigningUpCommand command, CancellationToken token)
        {
            await Mediator.Send(command, token);

            return(NoContent());
        }