Esempio n. 1
0
 public bool Send(EmailAggregate email)
 {
     _validator.ValidateAndThrow(email);
     _emailSenderService.Send(email);
     email.SetEmailStatus(EmailStatus.Sent);
     _repository.Save(email);
     return(true);
 }
Esempio n. 2
0
        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);
        }