Class AspNetCoreHostFixture
- Assembly
- Codebelt.Extensions.Xunit.Hosting.AspNetCore.dll
Provides a default implementation of the IAspNetCoreHostFixture interface.
public class AspNetCoreHostFixture : HostFixture, IAsyncLifetime, IAspNetCoreHostFixture, IHostFixture, IServiceTest, IHostTest, IConfigurationTest, IHostingEnvironmentTest, IDisposable, IAsyncDisposable, IPipelineTest
- Inheritance
-
ObjectAspNetCoreHostFixture
- Implements
-
IAsyncLifetimeIDisposableIAsyncDisposable
- Inherited Members
Constructors
AspNetCoreHostFixture()
Initializes a new instance of the AspNetCoreHostFixture class.
public AspNetCoreHostFixture()
Properties
Application
Gets the Microsoft.AspNetCore.Builder.IApplicationBuilder initialized by the Microsoft.Extensions.Hosting.IHost.
public IApplicationBuilder Application { get; protected set; }
Property Value
- IApplicationBuilder
The Microsoft.AspNetCore.Builder.IApplicationBuilder initialized by the Microsoft.Extensions.Hosting.IHost.
ConfigureApplicationCallback
Gets or sets the delegate that configures the HTTP request pipeline.
public Action<IApplicationBuilder> ConfigureApplicationCallback { get; set; }
Property Value
- Action<IApplicationBuilder>
The delegate that configures the HTTP request pipeline.
Methods
ConfigureHost(Test)
Creates and configures the Microsoft.AspNetCore.Hosting.IWebHost of this instance.
public override void ConfigureHost(Test hostTest)
Parameters
hostTest
TestThe object that inherits from AspNetCoreHostTest<T>.
Remarks
hostTest
was added to support those cases where the caller is required in the host configuration.
Exceptions
- System.ArgumentNullException
hostTest
is null.- System.ArgumentOutOfRangeException
hostTest
is not assignable from AspNetCoreHostTest<T>.