Example #1
0
        public void ChangeUserEmailAddress(ChangeEmailAddressCommand command)
        {
            var user = GetExistingUser(command.TenantId, command.Username);

            user.Person.ContactInformation.ChangeEmailAddress(new EmailAddress(command.EmailAddress));
            this.unitOfWork.Commit();
        }
        public async Task <IActionResult> CreateRegistration(Guid id, ChangeEmailAddressCommand request)
        {
            request.ApprenticeId = id;
            await _mediator.Send(request);

            return(Accepted());
        }
Example #3
0
 public void GivenAChangeEmailCommandWithAValidEmailAddress()
 {
     _command = _fixture
                .Build <ChangeEmailAddressCommand>()
                .Without(p => p.ApprenticeId)
                .With(p => p.Email, (MailAddress adr) => adr.ToString())
                .Create();
 }
Example #4
0
 public void GivenAnApprenticeExists()
 {
     _command = _fixture.Create <ChangeEmailAddressCommand>();
 }