public void TaskTestsInitialize() { Resolve <IDbConnectionFactory>().DeleteAllTestData(); _emailServer = EmailHost.Start(); _emailServer.ClearEmails(); }
public static MockEmail AssertEmailSent(this IMockEmailServer emailServer) { var messages = emailServer.GetEmails(); Assert.AreEqual(1, messages.Count); var email = messages[0]; emailServer.ClearEmails(); return(email); }
public static MockEmail[] AssertEmailsSent(this IMockEmailServer emailServer, int count) { var messages = emailServer.GetEmails(); Assert.AreEqual(count, messages.Count); var emails = new MockEmail[count]; messages.CopyTo(emails, 0); emailServer.ClearEmails(); return((from e in emails select e).ToArray()); }
public void EmailTestsInitialize() { Resolve <IDbConnectionFactory>().DeleteAllTestData(); _emailServer = EmailHost.Start(); _emailServer.ClearEmails(); InsecureRootPath = _webSiteQuery.GetUrl(WebSite.LinkMe, null, false, "~/").AbsoluteUri.ToLower(); SecureRootPath = _webSiteQuery.GetUrl(WebSite.LinkMe, null, true, "~/").AbsoluteUri.ToLower(); MockEmailTestExtensions.RootPath = InsecureRootPath; _australia = _locationQuery.GetCountry("Australia"); _notAustralia = _locationQuery.GetCountry("New Zealand"); }