I have a XUnit project for End2End test for my Api Project.
Inside the Unit project: MyApi.E2E.Test
under its root folder, I have a setting file:
e2e-local-settings.json
Now I have a File called: MyWebApplicationFactory
public class MyWebApplicationFactory<TStartUp>: WebApplicationFactory<Startup>
{
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
........code here.......
}
}
How can I load the setting json file under the TEST project.
I have read this one: https://stackoverflow.com/a/47591692/601862 But it does not load from the Test Project, instead it loads from the Api project.