Share via


WebApplicationFactory<TEntryPoint>.CreateServer(IWebHostBuilder) Method

Definition

Creates the TestServer with the bootstrapped application in builder. This is only called for applications using IWebHostBuilder. Applications based on IHostBuilder will use CreateHost(IHostBuilder) instead.

protected:
 virtual Microsoft::AspNetCore::TestHost::TestServer ^ CreateServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ builder);
protected virtual Microsoft.AspNetCore.TestHost.TestServer CreateServer (Microsoft.AspNetCore.Hosting.IWebHostBuilder builder);
abstract member CreateServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.TestHost.TestServer
override this.CreateServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.TestHost.TestServer
Protected Overridable Function CreateServer (builder As IWebHostBuilder) As TestServer

Parameters

builder
IWebHostBuilder

The IWebHostBuilder used to create the server.

Returns

The TestServer with the bootstrapped application.

Applies to