Class ManagedHostFixture
- Namespace
- Codebelt.Extensions.Xunit.Hosting
- Assembly
- Codebelt.Extensions.Xunit.Hosting.dll
Provides a default implementation of the IGenericHostFixture interface.
public class ManagedHostFixture : HostFixture, IAsyncLifetime, IGenericHostFixture, IHostFixture, IConfigurationTest, IEnvironmentTest, IDisposable, IAsyncDisposable
- Inheritance
-
ManagedHostFixture
- Implements
-
IAsyncLifetime
- Derived
- Inherited Members
- Extension Methods
Constructors
ManagedHostFixture()
Initializes a new instance of the ManagedHostFixture class.
public ManagedHostFixture()
Properties
ConfigureHostCallback
Gets or sets the delegate that initializes the host builder.
public Action<IHostBuilder> ConfigureHostCallback { get; set; }
Property Value
- Action<IHostBuilder>
The delegate that initializes the host builder.
ConfigureServicesCallback
Gets or sets the delegate that adds services to the container.
public Action<IServiceCollection> ConfigureServicesCallback { get; set; }
Property Value
- Action<IServiceCollection>
The delegate that adds services to the container.
Methods
ConfigureHost(Test)
Creates and configures the IHost of this instance.
public virtual void ConfigureHost(Test hostTest)
Parameters
hostTestTestThe object that inherits from HostTest<T>.
Remarks
hostTest was added to support those cases where the caller is required in the host configuration.
Exceptions
- ArgumentNullException
hostTestis null.- ArgumentOutOfRangeException
hostTestis not assignable from HostTest<T>.