Interface IWebApplicationFixture<TEntryPoint>
- Namespace
- Codebelt.Extensions.Xunit.Hosting.AspNetCore
- Assembly
- Codebelt.Extensions.Xunit.Hosting.AspNetCore.dll
Provides a way to use Microsoft Dependency Injection in tests that bootstrap an existing ASP.NET Core application entry point.
public interface IWebApplicationFixture<TEntryPoint> : IHostFixture, IConfigurationTest, IEnvironmentTest, IDisposable, IAsyncDisposable where TEntryPoint : class
Type Parameters
TEntryPointA type in the entry point assembly of the application.
- Inherited Members
- Extension Methods
Properties
ConfigureWebHostCallback
Gets or sets the delegate that provides a way to override the IWebHostBuilder before the application is built.
Action<IWebHostBuilder> ConfigureWebHostCallback { get; set; }
Property Value
- Action<IWebHostBuilder>
The delegate that provides a way to override the IWebHostBuilder.
Server
Gets the TestServer initialized by this instance.
TestServer Server { get; }
Property Value
- TestServer
The TestServer initialized by this instance.
Methods
ConfigureHost(Test)
Creates and configures the Host of this IWebApplicationFixture<TEntryPoint>.
void ConfigureHost(Test hostTest)
Parameters
hostTestTestThe object that inherits from WebApplicationTest<TEntryPoint, T>.
Remarks
hostTest was added to support those cases where the caller is required in the host configuration.