I have configured an xUnit project to test an Identity Server implementation. I have created a TestStartup class which inherits Startup and overrides my Identity Server implementation for testing purposes. The problem is when I call my TestStartup using my custom WebApplicationFactory, my endpoints are not mapped. If I call Startup from my custom WebApplicationFactory, my endpoints are mapped.
Startup.cs
protected readonly IConfiguration _configuration;
protected readonly IWebHostEnvironment _webHostEnvironment;
public Startup(IConfiguration configuration, IWebHostEnvironment environment)
{
_configuration = configuration;
_webHostEnvironment …Run Code Online (Sandbox Code Playgroud)