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

            return(email.ViewName);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public string TestAction()
 {
     EmailResult email =
         new TestMailController {HttpContextBase = MvcHelper.GetHttpContext("/app/", null, null)}.TestMail();
     return email.ViewName;
 }
Ejemplo n.º 4
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);
        }