MinimalHostTest<T> Class
Definition
- Namespace
- Codebelt.Extensions.Xunit.Hosting
- Assemblies
- Codebelt.Extensions.Xunit.Hosting.dll
Represents a base class from which all implementations of unit testing, that uses Microsoft Dependency Injection (minimal style), should derive.
public abstract class MinimalHostTest<T> : MinimalHostTest, IAsyncLifetime, IHostTest, IConfigurationTest, IEnvironmentTest, ITest, IDisposable, IAsyncDisposable, IClassFixture<T> where T : class, IMinimalHostFixture
Type Parameters
TThe type of the object that implements the IGenericHostFixture interface.
- Inheritance
-
MinimalHostTest<T>
- Implements
-
IAsyncLifetimeIClassFixture<T>
- Inherited Members
Remarks
The class needed to be designed in this rather complex way, as this is the only way that xUnit supports a shared context. The need for shared context is theoretical at best, but it does opt-in for Scoped instances.
Constructors
| Name | Description |
|---|---|
| MinimalHostTest(bool, T, ITestOutputHelper, Type) | Initializes a new instance of the HostTest<T> class. |
| MinimalHostTest(T, ITestOutputHelper, Type) | Initializes a new instance of the HostTest<T> class. |
See Also
IClassFixture<TFixture>