Table of Contents

Class AspNetCoreHostFixture

Namespace
Cuemon.Extensions.Xunit.Hosting.AspNetCore
Assembly
Cuemon.Extensions.Xunit.Hosting.AspNetCore.dll

Provides a default implementation of the IAspNetCoreHostFixture interface.

public class AspNetCoreHostFixture : HostFixture, IDisposable, IAspNetCoreHostFixture, IHostFixture, IServiceTest, IHostTest, IConfigurationTest, IHostingEnvironmentTest, IPipelineTest
Inheritance
Object
AspNetCoreHostFixture
Implements
IDisposable
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 Test

The 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>.

See Also