Create Method
Definition
- Namespace
- Codebelt.Extensions.Xunit.Hosting
- Assemblies
- Codebelt.Extensions.Xunit.Hosting.dll
Create<TEntryPoint>(Action<IHostBuilder>, IApplicationFixture<TEntryPoint>)
Creates and returns an IHostTest implementation.
public static IHostTest Create<TEntryPoint>(Action<IHostBuilder> hostSetup = null, IApplicationFixture<TEntryPoint> hostFixture = null) where TEntryPoint : class
Parameters
hostSetupAction<IHostBuilder>The IHostBuilder which may be configured.
hostFixtureIApplicationFixture<TEntryPoint>An optional IApplicationFixture<TEntryPoint> implementation to use instead of the default ManagedApplicationFixture<TEntryPoint> instance.
Returns
Type Parameters
TEntryPointA type in the entry point assembly of the application.
Remarks
When hostFixture is omitted, the factory uses ManagedApplicationFixture<TEntryPoint> so the application entry point owns deferred host startup. Pass another IApplicationFixture<TEntryPoint> implementation when the test requires a different lifecycle.