public void NullEmail_ReturnsNotFound()
        {
            emailRepository.GetAsync(Guid.NewGuid()).ReturnsForAnyArgs((Email)null);

            var email = getEmailUseCase.GetEmailAsync(Guid.NewGuid()).GetAwaiter().GetResult();

            Assert.IsInstanceOf <NotFound>(email.Value);
        }
Beispiel #2
0
 public async Task <IEnumerable <EmailAddress> > GetAsync()
 {
     return(await _repository.GetAsync());
 }
Beispiel #3
0
 public async Task <IEmail[]> GetSentEmailsAsync(string to, string campaignId = null)
 {
     return((await _emailRepository.GetAsync(to, campaignId)).ToArray());
 }
Beispiel #4
0
        public async Task <EmailDto> GetAsync(Guid id)
        {
            var email = await _emailRepository.GetAsync(id);

            return(ObjectMapper.Map <Email, EmailDto>(email));
        }