private AccountController CreateAccountController(object ViewModel)
 {
     var accountController = new AccountController(MockingHelper.ApplicationManager);
     accountController.ControllerContext = MockingHelper.ControllerContext;
     if (ViewModel != null)
     {
         var modelBinder = new ModelBindingContext()
         {
             ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => ViewModel, ViewModel.GetType()),
             ValueProvider = new NameValueCollectionValueProvider(new NameValueCollection(), CultureInfo.InvariantCulture)
         };
         var binder = new DefaultModelBinder().BindModel(accountController.ControllerContext, modelBinder);
         accountController.ModelState.Clear();
         accountController.ModelState.Merge(modelBinder.ModelState);
     }
     return accountController;
 }
 public void TestRegisterGet()
 {
     var accountController = new AccountController();
     var result = accountController.Register();
     Assert.IsInstanceOfType(result, typeof(ViewResult));
 }
 public void TestAccountLoginGet()
 {
     var accountController = new AccountController();
     var result = accountController.Login(null);
     Assert.IsInstanceOfType(result, typeof(ViewResult));
 }