Example #1
0
 public ModelBinderTester()
 {
     Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
     provider = new FluentValidationModelValidatorProvider(new AttributedValidatorFactory());
     ModelValidatorProviders.Providers.Add(provider);
     DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;
     binder            = new DefaultModelBinder();
     controllerContext = new ControllerContext {
         HttpContext = MockHttpContext.Create()
     };
 }