Наследование: Controllers.Controller
        public void tewwet()
        {
            var productRepository = new Moq.Mock<IProductRepository>();
            productRepository.Setup(x => x.Get())
                             .Returns(new[]
                                          {
                                              new Product()
                                                  {
                                                      ID = 1,
                                                      Title = "iPad",
                                                      Description = "Fruit based tablet",
                                                      UnitPrice = 450
                                                  },
                                              new Product()
                                                  {
                                                      ID = 2,
                                                      Title = "iPhone",
                                                      Description = "Fruit based phone",
                                                      UnitPrice = 500
                                                  }
                                          });

            var homeController = new HomeController(productRepository.Object);

            var result = homeController.Index() as ViewResult;

            Assert.NotNull(result.Model);
        }
        public void CleanUpController()
        {
            this.automapperConfig = null;

            this.packages = null;
            this.issues = null;
            this.users = null;

            this.controller.Dispose();
            this.controller = null;
        }
        public void InitializeController()
        {
            this.automapperConfig = new AutoMapperConfig();
            this.automapperConfig.Execute(typeof(HomeController).Assembly);

            this.packages = Services.GetPackagesService();
            this.issues = Services.GetIssuesService();
            this.users = Services.GetUsersService();

            this.controller = new HomeController(this.packages, this.issues, this.users);
        }
		public void Init()
		{
			var en = CultureInfo.CreateSpecificCulture("en");

			Thread.CurrentThread.CurrentCulture	= en;
			Thread.CurrentThread.CurrentUICulture = en;

			helper = new FormHelper();
			model = new ModelWithValidation();

			var controller = new HomeController();
			var controllerContext = new ControllerContext();

			controllerContext.PropertyBag.Add("model", model);

			helper.SetController(controller, controllerContext);
		}
		public void Init()
		{
			CultureInfo en = CultureInfo.CreateSpecificCulture("en");

			Thread.CurrentThread.CurrentCulture = en;
			Thread.CurrentThread.CurrentUICulture = en;

			helper = new FormHelper();
			helper.UseWebValidatorProvider(new JQueryValidator());
			model = new ModelWithValidation();

			HomeController controller = new HomeController();
			ControllerContext controllerContext = new ControllerContext();

			controllerContext.PropertyBag.Add("model", model);

			helper.SetController(controller, controllerContext);
		}