Class AspNetCoreHostTest<T>
- Assembly
- Cuemon.Extensions.Xunit.Hosting.AspNetCore.dll
Represents a base class from which all implementations of unit testing, that uses Microsoft Dependency Injection and depends on ASP.NET Core, should derive.
public abstract class AspNetCoreHostTest<T> : HostTest<T>, ITest, IDisposable, IClassFixture<T> where T : class, IAspNetCoreHostFixture
Type Parameters
T
The type of the object that implements the IAspNetCoreHostFixture interface.
- Inheritance
-
ObjectHostTest<T>AspNetCoreHostTest<T>
- Implements
-
IDisposableIClassFixture<T>
- Inherited Members
Constructors
AspNetCoreHostTest(T, ITestOutputHelper, Type)
Initializes a new instance of the AspNetCoreHostTest<T> class.
protected AspNetCoreHostTest(T hostFixture, ITestOutputHelper output = null, Type callerType = null)
Parameters
hostFixture
TAn implementation of the IAspNetCoreHostFixture interface.
output
ITestOutputHelperAn implementation of the Xunit.Abstractions.ITestOutputHelper interface.
callerType
TypeThe System.Type of caller that ends up invoking this instance.
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.
Methods
ConfigureApplication(IApplicationBuilder)
Configures the HTTP request pipeline.
public abstract void ConfigureApplication(IApplicationBuilder app)
Parameters
app
IApplicationBuilderThe type that provides the mechanisms to configure the HTTP request pipeline.
InitializeHostFixture(T)
Initializes the specified host fixture.
protected override void InitializeHostFixture(T hostFixture)
Parameters
hostFixture
TThe host fixture to initialize.