示例#1
0
        public void TaskTestsInitialize()
        {
            Resolve <IDbConnectionFactory>().DeleteAllTestData();

            _emailServer = EmailHost.Start();
            _emailServer.ClearEmails();
        }
示例#2
0
        public static MockEmail AssertEmailSent(this IMockEmailServer emailServer)
        {
            var messages = emailServer.GetEmails();

            Assert.AreEqual(1, messages.Count);
            var email = messages[0];

            emailServer.ClearEmails();
            return(email);
        }
示例#3
0
        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());
        }
示例#4
0
        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");
        }