WebApplicationTest<TEntryPoint, T> Class
Definition
- Namespace
- Codebelt.Extensions.Xunit.Hosting.AspNetCore
- Assemblies
- Codebelt.Extensions.Xunit.Hosting.AspNetCore.dll
Represents a base class from which all implementations of unit testing, that uses Microsoft Dependency Injection and depends on an existing ASP.NET Core application entry point, should derive.
public abstract class WebApplicationTest<TEntryPoint, T> : HostTest, IAsyncLifetime, IHostTest, IConfigurationTest, IEnvironmentTest, ITest, IDisposable, IAsyncDisposable, IClassFixture<T> where TEntryPoint : class where T : class, IWebApplicationFixture<TEntryPoint>
Type Parameters
TEntryPointA type in the entry point assembly of the application.
TThe type of the object that implements the IWebApplicationFixture<TEntryPoint> interface.
- Inheritance
-
WebApplicationTest<TEntryPoint, T>
- Implements
-
IAsyncLifetimeIClassFixture<T>
- Inherited Members
Constructors
| Name | Description |
|---|---|
| WebApplicationTest(bool, T, ITestOutputHelper, Type) | Initializes a new instance of the WebApplicationTest<TEntryPoint, T> class. |
| WebApplicationTest(T, ITestOutputHelper, Type) | Initializes a new instance of the WebApplicationTest<TEntryPoint, T> class. |
Properties
| Name | Description |
|---|---|
| Server | Gets the TestServer initialized by the Host. |
Methods
| Name | Description |
|---|---|
| ConfigureWebHost(IWebHostBuilder) | Provides a way to override the IWebHostBuilder defaults before the application is built. |
See Also
IClassFixture<TFixture>