// Copy constructor internal WebApplicationFactoryClientOptions(WebApplicationFactoryClientOptions clientOptions) { BaseAddress = clientOptions.BaseAddress; AllowAutoRedirect = clientOptions.AllowAutoRedirect; MaxAutomaticRedirections = clientOptions.MaxAutomaticRedirections; HandleCookies = clientOptions.HandleCookies; }
public DelegatedWebApplicationFactory( WebApplicationFactoryClientOptions options, Func <IWebHostBuilder, TestServer> createServer, Func <IWebHostBuilder> createWebHostBuilder, Func <IEnumerable <Assembly> > getTestAssemblies, Action <IWebHostBuilder> configureWebHost) { ClientOptions = new WebApplicationFactoryClientOptions(options); _createServer = createServer; _createWebHostBuilder = createWebHostBuilder; _getTestAssemblies = getTestAssemblies; _configuration = configureWebHost; }
/// <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(WebApplicationFactoryClientOptions options) => CreateDefaultClient(options.BaseAddress, options.CreateHandlers());
private WebApplicationFactory(Action <IWebHostBuilder> configuration, WebApplicationFactoryClientOptions options) { _configuration = configuration; ClientOptions = options; }