Table of Contents

CreateWithHostBuilderContext Method

Definition

Namespace
Codebelt.Extensions.Xunit.Hosting.AspNetCore
Assemblies
Codebelt.Extensions.Xunit.Hosting.AspNetCore.dll
Source
src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/MinimalWebHostTestFactory.cs

CreateWithHostBuilderContext(Action<HostBuilderContext, IServiceCollection>, Action<HostBuilderContext, IApplicationBuilder>, Action<IHostApplicationBuilder>, IWebMinimalHostFixture)

Creates and returns an IWebHostTest implementation.

public static IWebHostTest CreateWithHostBuilderContext(Action<HostBuilderContext, IServiceCollection> serviceSetup = null, Action<HostBuilderContext, IApplicationBuilder> pipelineSetup = null, Action<IHostApplicationBuilder> hostSetup = null, IWebMinimalHostFixture hostFixture = null)

Parameters

serviceSetup Action<HostBuilderContext, IServiceCollection>

The IServiceCollection which may be configured.

pipelineSetup Action<HostBuilderContext, IApplicationBuilder>

The IApplicationBuilder which may be configured.

hostSetup Action<IHostApplicationBuilder>

The IHostBuilder which may be configured.

hostFixture IWebMinimalHostFixture

An optional IWebHostFixture implementation to use instead of the default ManagedWebHostFixture instance.

Returns

IWebHostTest

An instance of an IWebHostTest implementation.