Skip to content

Instantly share code, notes, and snippets.

View Antonystar's full-sized avatar

Anton Starastsin Antonystar

View GitHub Profile
@AnthonyGiretti
AnthonyGiretti / MyWebFactory.cs
Created March 16, 2021 16:54
Web application factory that uses a custom startup file for integration tests
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Calzolari.WebApi.Tests.Common
{
public class MyWebFactory : WebApplicationFactory<Startup>
{
protected override IHostBuilder CreateHostBuilder()
{
return Host.CreateDefaultBuilder().ConfigureWebHost((builder) =>