Skip to content

Instantly share code, notes, and snippets.

Created January 28, 2022 00:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
private WebApplicationFactory<Program> GetWebApplicationFactory() =>
new WebApplicationFactory<Program>()
.WithWebHostBuilder(builder =>
IConfigurationSection? configSection = null;
builder.ConfigureAppConfiguration((context, config) =>
config.AddJsonFile(Path.Combine(Directory.GetCurrentDirectory(), AppSettingsFile));
configSection = context.Configuration.GetSection(nameof(WeatherDatabaseSettings));
builder.ConfigureTestServices(services =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment