Table of Contents

Create Method

Definition

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

Create(Action<IServiceCollection>, Action<IApplicationBuilder>, Action<IHostApplicationBuilder>, IWebMinimalHostFixture)

Creates and returns an IWebHostTest implementation.

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

Parameters

serviceSetup Action<IServiceCollection>

The IServiceCollection which may be configured.

pipelineSetup Action<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.