public MvcIntegrationTests(ITestOutputHelper output, WebAppFixture <Startup> webApp) { CultureScope.SetDefaultCulture(); this._output = output; this._webApp = webApp; }
public MvcIntegrationTests(ITestOutputHelper output, WebAppFixture webApp) { CultureScope.SetDefaultCulture(); _output = output; _webApp = webApp; _client = webApp.CreateClientWithServices(services => { services.AddMvc().AddNewtonsoftJson().AddFluentValidation(); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped <IValidator <TestModel>, TestModelValidator>(); services.AddScoped <IValidator <TestModel3>, TestModelValidator3>(); services.AddScoped <IValidator <TestModel4>, TestModel4Validator>(); services.AddScoped <IValidator <TestModel5>, TestModel5Validator>(); services.AddScoped <IValidator <TestModel6>, TestModel6Validator>(); services.AddScoped <IValidator <TestModelWithOverridenMessageValueType>, TestModelWithOverridenMessageValueTypeValidator>(); services.AddScoped <IValidator <RulesetTestModel>, RulesetTestValidator>(); services.AddScoped <IValidator <PropertiesTestModel>, PropertiesValidator>(); services.AddScoped <IValidator <PropertiesTestModel2>, PropertiesValidator2>(); services.AddScoped <IValidator <MultipleErrorsModel>, MultipleErrorsModelValidator>(); services.AddScoped <IValidator <MultiValidationModel>, MultiValidationValidator>(); services.AddScoped <IValidator <MultiValidationModel2>, MultiValidationValidator2>(); services.AddScoped <IValidator <MultiValidationModel3>, MultiValidationValidator3>(); services.AddScoped <IValidator <ImplementsIValidatableObjectModel>, ImplementsIValidatableObjectValidator>(); services.AddScoped <IValidator <ParentModel6>, ParentModel6Validator>(); services.AddScoped <IValidator <TestModelWithOverridenPropertyNameValueType>, TestModelWithOverridenPropertyNameValidator>(); }); }
public MvcIntegrationTests(ITestOutputHelper output) { CultureScope.SetDefaultCulture(); this._output = output; _server = BuildTestServer <Startup>(); _client = _server.CreateClient(); }
public ClientsideMessageTester(WebAppFixture webApp) { _client = webApp.CreateClientWithServices(services => { services.AddMvc().AddNewtonsoftJson().AddFluentValidation(fv => { fv.RegisterValidatorsFromAssemblyContaining <TestController>(); }); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped <ClientsideScopedDependency>(); services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; }); }); CultureScope.SetDefaultCulture(); }
public MvcIntegrationTests(ITestOutputHelper output, WebAppFixture webApp) { CultureScope.SetDefaultCulture(); _output = output; _webApp = webApp; _client = webApp .WithFluentValidation(fv => { fv.ValidatorFactoryType = typeof(AttributedValidatorFactory); fv.ImplicitlyValidateChildProperties = true; }) .CreateClient(); }
public ClientsideMessageTester(WebAppFixture webApp) { _client = webApp.WithContainer(enableLocalization: true).CreateClient(); CultureScope.SetDefaultCulture(); }
public ClientsideMessageTester(ClientsideFixture <StartupWithContainer> webApp) { _webApp = webApp; CultureScope.SetDefaultCulture(); }
public ClientsideMessageTester(ClientsideFixture fixture) { this._fixture = fixture; CultureScope.SetDefaultCulture(); }
public ClientsideMessageTester(WebAppFixture webApp) { _client = webApp.WithContainer().CreateClient(); CultureScope.SetDefaultCulture(); }