public async Task TestSendMail_SuccessfullyWithAwait_WithTemplate() { string RecipientEmail = "*****@*****.**"; string Subject = "UnitTest: MAIL SENT WITH AWAIT - WITH TEMPLATE"; string Body = new EmailTemplateHelper().GetTemplateContent("NMRC-Template"); EmailHelper.Message message = new EmailHelper.Message(RecipientEmail, Subject, Body); EmailHelper emailHelper = new EmailHelper(); bool successStatus = await emailHelper.SendMail(JsonConvert.SerializeObject(message)); Assert.IsTrue(successStatus); }
public async Task TestSendMail_SuccessfullyWithAwait_WithoutBccEmail() { string RecipientEmail = "*****@*****.**"; string Subject = "UnitTest: MAIL SENT WITH AWAIT - WITH NO BCC"; string Body = "this is the body of the email. some message here."; EmailHelper.Message message = new EmailHelper.Message(RecipientEmail, Subject, Body); EmailHelper emailHelper = new EmailHelper(); bool successStatus = await emailHelper.SendMail(JsonConvert.SerializeObject(message)); Assert.IsTrue(successStatus); }
public void TestSendMail_SuccessfullyWithoutAwait() { string RecipientEmail = "*****@*****.**"; string BccEmail = "*****@*****.**"; string Subject = "UnitTest: MAIL SENT WITHOUT AWAIT"; string Body = "this is the body of the email. some message here."; EmailHelper.Message message = new EmailHelper.Message(RecipientEmail, BccEmail, Subject, Body); EmailHelper emailHelper = new EmailHelper(); emailHelper.SendMail(JsonConvert.SerializeObject(message)); }
public async Task TestAddEmailToQueue_SuccessfullyWithAwait() { string RecipientEmail = "*****@*****.**"; string BccEmail = "*****@*****.**"; string Subject = "UnitTest: NEW MAIL ADDED TO QUEUE"; string Body = "this is the body of the email. some message here."; EmailHelper.Message message = new EmailHelper.Message(RecipientEmail, BccEmail, Subject, Body); EmailHelper emailHelper = new EmailHelper(); bool successStatus = await emailHelper.AddEmailToQueue(message); Assert.IsTrue(successStatus); }