CreateWithHostBuilderContext Method
Definition
- Namespace
- Codebelt.Extensions.Xunit.Hosting.AspNetCore
- Assemblies
- Codebelt.Extensions.Xunit.Hosting.AspNetCore.dll
CreateWithHostBuilderContext(Action<HostBuilderContext, IServiceCollection>, Action<HostBuilderContext, IApplicationBuilder>, Action<IHostBuilder>, IWebHostFixture)
Creates and returns an IWebHostTest implementation.
public static IWebHostTest CreateWithHostBuilderContext(Action<HostBuilderContext, IServiceCollection> serviceSetup = null, Action<HostBuilderContext, IApplicationBuilder> pipelineSetup = null, Action<IHostBuilder> hostSetup = null, IWebHostFixture hostFixture = null)
Parameters
serviceSetupAction<HostBuilderContext, IServiceCollection>The IServiceCollection which may be configured.
pipelineSetupAction<HostBuilderContext, IApplicationBuilder>The IApplicationBuilder which may be configured.
hostSetupAction<IHostBuilder>The IHostBuilder which may be configured.
hostFixtureIWebHostFixtureAn optional IWebHostFixture implementation to use instead of the default ManagedWebHostFixture instance.
Returns
- IWebHostTest
An instance of an IWebHostTest implementation.