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
TStartupThe ASP.NET Core
Startuptype used to configure the test host.TDbContextThe EF Core context type used by the application.
- Inheritance
-
WebApplicationFactory<TStartup>AuthenticatedWebApplicationFactory<TStartup>EntityFrameworkWebApplicationFactory<TStartup, TDbContext>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
builderIWebHostBuilderThe 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.