using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.Hosting; namespace OpenAuth.WebApi.Test { /// /// Based upon https://github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/test/integration-tests/samples/3.x/IntegrationTestsSample /// /// public class AutofacWebApplicationFactory : WebApplicationFactory where TStartup : class { protected override IHost CreateHost(IHostBuilder builder) { builder.UseServiceProviderFactory(new CustomServiceProviderFactory()); return base.CreateHost(builder); } } }