Exemplo n.º 1
0
        public void TestContact()
        {
            ECCController controller = new ECCController();
            var           result     = controller.Contact() as ViewResult;

            Assert.AreEqual("Contact", result.ViewName);
        }
Exemplo n.º 2
0
        public void TestSetup()
        {
            controller = new ECCController();
            var result = controller.Index() as ViewResult;

            ecc     = (ECC)result.ViewData.Model;
            context = new Mock <ControllerContext>();
            session = new Mock <HttpSessionStateBase>();
            context.Setup(m => m.HttpContext.Session).Returns(session.Object);
            controller.ControllerContext = context.Object;
            session.Setup(s => s["ECCModel"]).Returns(ecc);
        }