Class StartupEntityFrameworkWebApplicationFactory<TStartup, TDbContext>

Namespace
XBullet.EasyTesting.EntityFrameworkCore
Assembly
XBullet.EasyTesting.EntityFrameworkCore.dll

A Startup-based authenticated test host with Entity Framework Core database and scenario support that does not execute Program.Main.

public abstract class StartupEntityFrameworkWebApplicationFactory<TStartup, TDbContext> : EntityFrameworkWebApplicationFactory<TStartup, TDbContext>, IDisposable, IAsyncDisposable where TStartup : class where TDbContext : DbContext

Type Parameters

TStartup

The ASP.NET Core Startup type used to configure the test host.

TDbContext

The EF Core context type used by the application.

Inheritance
StartupEntityFrameworkWebApplicationFactory<TStartup, TDbContext>
Implements
Inherited Members

Methods

ConfigureWebHost(IWebHostBuilder)

Gives a fixture an opportunity to configure the application before it gets built.

protected override void ConfigureWebHost(IWebHostBuilder builder)

Parameters

builder IWebHostBuilder

The IWebHostBuilder for the application.

CreateHostBuilder()

Creates a IHostBuilder used to set up TestServer.

protected override IHostBuilder CreateHostBuilder()

Returns

IHostBuilder

A IHostBuilder instance.

Remarks

The default implementation of this method looks for a public static IHostBuilder CreateHostBuilder(string[] args) method defined on the entry point of the assembly of TEntryPoint and invokes it passing an empty string array as arguments.