Interface IGenericHostFixture
- Namespace
- Codebelt.Extensions.Xunit.Hosting
- Assembly
- Codebelt.Extensions.Xunit.Hosting.dll
Provides a way to use Microsoft Dependency Injection in unit tests.
public interface IGenericHostFixture : IHostFixture, IConfigurationTest, IEnvironmentTest, IDisposable, IAsyncDisposable
- Inherited Members
- Extension Methods
Properties
ConfigureHostCallback
Gets or sets the delegate that provides a way to override the IHostBuilder defaults set up by ConfigureHost(Test).
Action<IHostBuilder> ConfigureHostCallback { get; set; }
Property Value
- Action<IHostBuilder>
The delegate that provides a way to override the IHostBuilder.
ConfigureServicesCallback
Gets or sets the delegate that adds services to the container.
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 IGenericHostFixture.
void ConfigureHost(Test hostTest)
Parameters
hostTest
TestThe object that inherits from HostTest<T>.
Remarks
hostTest
was added to support those cases where the caller is required in the host configuration.