Class HostTest
- Namespace
- Codebelt.Extensions.Xunit.Hosting
- Assembly
- Codebelt.Extensions.Xunit.Hosting.dll
Represents the non-generic base class from where its generic equivalent should derive.
public abstract class HostTest : Test, IAsyncLifetime, IHostTest, IConfigurationTest, IEnvironmentTest, ITest, IDisposable, IAsyncDisposable
- Inheritance
-
HostTest
- Implements
-
IAsyncLifetime
- Derived
- Inherited Members
Constructors
HostTest(ITestOutputHelper, Type)
Initializes a new instance of the HostTest class.
protected HostTest(ITestOutputHelper output = null, Type callerType = null)
Parameters
output
ITestOutputHelperAn implementation of the Xunit.Abstractions.ITestOutputHelper interface.
callerType
TypeThe Type of caller that ends up invoking this instance.
Properties
Configuration
Gets the IConfiguration initialized by the IHost.
public IConfiguration Configuration { get; protected set; }
Property Value
- IConfiguration
The IConfiguration initialized by the IHost.
Environment
Gets the IHostEnvironment initialized by the IHost.
public IHostEnvironment Environment { get; protected set; }
Property Value
- IHostEnvironment
The IHostEnvironment initialized by the IHost.
Host
Gets the IHost initialized by the IGenericHostFixture.
public IHost Host { get; protected set; }
Property Value
- IHost
The IHost initialized by the IGenericHostFixture.
Methods
Configure(IConfiguration, IHostEnvironment)
Adds Configuration and Environment to this instance.
public virtual void Configure(IConfiguration configuration, IHostEnvironment environment)
Parameters
configuration
IConfigurationThe IConfiguration initialized by the IHost.
environment
IHostEnvironmentThe IHostEnvironment initialized by the IHost.