public void EmailService_SendErrorReports() { string environment = ConfigurationManager.AppSettings["Environment"].ToUpper(); if (environment == "TEST") // set by appharbour { Assert.Inconclusive("Not running SMTP-dependent test on AppHarbour"); return; } TestContext.WriteLine("This test requires a local SMTP server (like http://papercut.codeplex.com) listening on port 25"); var service = new EmailService(); service.SendErrorReports( new App { Id = "appId", Name = "appName" }, new ErrorReport { Message = "message" }, new List<string>{ "*****@*****.**" }); TestContext.WriteLine("Email successfully sent."); }
public void EmailService_SendConfirmation() { string environment = ConfigurationManager.AppSettings["Environment"].ToUpper(); if (environment == "TEST") // set by appharbour { Assert.Inconclusive("Not running SMTP-dependent test on AppHarbour"); return; } TestContext.WriteLine("This test requires a local SMTP server (like http://papercut.codeplex.com) listening on port 25"); var service = new EmailService(); service.SendConfirmationEmails(new List<ContactEmail> { new ContactEmail { ConfirmationCode = "confirm_code", EmailAddress = "*****@*****.**" } }); TestContext.WriteLine("Email successfully sent."); }