public void Mailbox_Test_Upsert() { EmailService service = new EmailService(); var mailbox = GenerateMailboxEntity(); var response = service.Upsert(mailbox); Assert.IsNotNull(response); }
public void Email_Test_GetInboxEmails() { string email = GetTestRecepientEmail().MD5(); EmailService service = new EmailService(); Dto<Email> emails = service.GetInboxEmails(email, 0, 10, 0); int count = emails.TotalRows; int serviceCount = service.CountInboxEmails(email, 0, 10, 0); }
public void Mailbox_Test_PopulateMailbox() { EmailService EmailService = new EmailService(); var mailbox = GenerateMailboxEntity(); var response = EmailService.Upsert(mailbox); EmailService emailService = new EmailService(); for (int i = 0; i < 10; i++) { Email input = GenerateEmailEntity(); Email output = emailService.Upsert(input); Assert.IsNotNull(output); } Assert.IsNotNull(response); }
public void Email_Test_UpsertData() { EmailService service = new EmailService(); for (int i = 0; i < 5; i++) { Email input = GenerateEmailEntity(); Email output = service.Upsert(input); Assert.IsNotNull(output); } for (int i = 0; i < 15; i++) { Email input = GenerateEmailEntity("*****@*****.**"); Email output = service.Upsert(input); Assert.IsNotNull(output); } }
public Mailbox GetAll(int page = 0, int limit = 10, int skip = 0) { try { Mailbox mailbox = new Mailbox(); mailbox.RecepientEmail = "*****@*****.**"; if (mailbox != null) { EmailService emailService = new EmailService(); var dto = emailService.GetEmails(page, limit, skip, null, null, null, null, "desc"); if (dto != null && dto.Entities != null) { mailbox.Emails = dto.Entities; mailbox.TotalEmails = dto.TotalRows; } } return mailbox; } catch (Exception ex) { throw HandleException(new object[] { page, limit, skip }, ex); } }
public EmailController() { emailService = new EmailService(); }
public MailgunController() { emailService = new EmailService(); }
public void Email_Test_GetEmails() { EmailService service = new EmailService(); var output = service.GetEmails(0,10,0,null,null,null,null,"desc"); }
public Mailbox GetEmails(string id, int page = 0, int limit = 10, int skip = 0) { try { var mailbox = _mailboxRepository.Get(id); if (mailbox != null) { EmailService emailService = new EmailService(); var dto = emailService.GetInboxEmails(id, page, limit, skip); if (dto != null && dto.Entities != null) { mailbox.Emails = dto.Entities; mailbox.TotalEmails = dto.TotalRows; } } return mailbox; } catch (Exception ex) { throw HandleException(new object[] { id }, ex); } }