I am using TestServer to instantiate my asp.net core web app during test.
var server = new TestServer(new WebHostBuilder().UseStartup<Startup>());
In the Startup of the web app, I access different resources, depending whether the environment is Production or Development. Now I need a third case: Test. Can I detect in the Startup, that it is being invoked by the tests via the TestServer?
Aucun commentaire:
Enregistrer un commentaire