Beispiel #1
0
        public ActionResult Index()
        {
            var user       = (User)Session["User"];
            var factory    = new OrderControllerFactory();
            var controller = factory.CreateController(user);

            return(RedirectToAction("Index", controller.ToString()));
        }
Beispiel #2
0
        public void TestFactory(UserType userType, Type expected)
        {
            var actual = new OrderControllerFactory().CreateController(userType);

            Assert.IsInstanceOfType(actual, expected);
        }