Example #1
0
        public string TestAction()
        {
            EmailResult email =
                new TestMailController {
                HttpContextBase = MvcHelper.GetHttpContext("/app/", null, null)
            }.TestMail();

            return(email.ViewName);
        }
Example #2
0
        public void ViewNameShouldBePassedProperly()
        {
            var mailer = new TestMailController();

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new TextViewEngine());
            mailer.HttpContextBase = MvcHelper.GetHttpContext("/app/", null, null);

            EmailResult email = mailer.TestMail();

            Assert.AreEqual("TestView", email.ViewName);
        }
        public void ViewNameShouldBePassedProperly()
        {
            var mailer = new TestMailController();
            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new TextViewEngine());
            mailer.HttpContextBase = MvcHelper.GetHttpContext("/app/", null, null);

            EmailResult email = mailer.TestMail();

            Assert.AreEqual("TestView", email.ViewName);
        }
 public string TestAction()
 {
     EmailResult email =
         new TestMailController {HttpContextBase = MvcHelper.GetHttpContext("/app/", null, null)}.TestMail();
     return email.ViewName;
 }