Exemplo n.º 1
0
 // Copy constructor
 internal WebModuleFactoryClientOptions(WebModuleFactoryClientOptions clientOptions)
 {
     BaseAddress              = clientOptions.BaseAddress;
     AllowAutoRedirect        = clientOptions.AllowAutoRedirect;
     MaxAutomaticRedirections = clientOptions.MaxAutomaticRedirections;
     HandleCookies            = clientOptions.HandleCookies;
 }
Exemplo n.º 2
0
 public DelegatedWebApplicationFactory(
     WebModuleFactoryClientOptions options,
     Func <IWebHostBuilder, TestServer> createServer,
     Func <IHostBuilder, IHost> createHost,
     Func <IModulesHostBuilder> createModuleHostBuilder,
     Func <IEnumerable <Assembly> > getTestAssemblies,
     Action <HttpClient> configureClient,
     Action <IWebHostBuilder> configureWebHost,
     Action <IModuleHostingOptions> configureModule)
 {
     ClientOptions            = new WebModuleFactoryClientOptions(options);
     _createServer            = createServer;
     _createHost              = createHost;
     _createModuleHostBuilder = createModuleHostBuilder;
     _getTestAssemblies       = getTestAssemblies;
     _configureClient         = configureClient;
     _configuration           = configureWebHost;
     _configureModule         = configureModule;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates an instance of <see cref="HttpClient"/> that automatically follows
 /// redirects and handles cookies.
 /// </summary>
 /// <returns>The <see cref="HttpClient"/>.</returns>
 public HttpClient CreateClient(WebModuleFactoryClientOptions options) =>
 CreateDefaultClient(options.BaseAddress, options.CreateHandlers());