public bool Send(EmailAggregate email) { _validator.ValidateAndThrow(email); _emailSenderService.Send(email); email.SetEmailStatus(EmailStatus.Sent); _repository.Save(email); return(true); }
public void Should_Set_Email_Status() { //Arrange EmailAggregate emailAggregate = _fixture.Create <EmailAggregate>(); //Act emailAggregate.SetEmailStatus(Common.EmailStatus.Sent); //Assert Assert.True(emailAggregate.Status == Common.EmailStatus.Sent); }