Exemple #1
0
        public void TestDetailsForViewResult()
        {
            FirstController contro1 = new FirstController();
            var             result1 = contro1.Details(2) as ViewResult;

            Assert.AreEqual("Details", result1.ViewName);
        }
Exemple #2
0
        public void TestDetailsForRedirect()
        {
            FirstController contro = new FirstController();
            var             result = contro.Details(-1) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["Action"]);
            Assert.AreEqual("HomeController", result.RouteValues["Controller"]);
        }