Build test host using given app config file

This commit is contained in:
2022-04-16 02:35:20 +01:00
parent ce8b7bcdb3
commit 4bb43877c7

View File

@ -13,7 +13,6 @@ namespace isnd.host.tests
{ {
public class UnitTestWebHost public class UnitTestWebHost
{ {
const string testingUrl = "http://localhost:5000";
[Fact] [Fact]
@ -21,7 +20,7 @@ namespace isnd.host.tests
{ {
string envVar = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); string envVar = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
IWebHost webhost = BuildWebHost(new string[] { "--urls", testingUrl }); IWebHost webhost = BuildWebHost(new string[0]);
using (var serviceScope = webhost.Services.CreateScope()) using (var serviceScope = webhost.Services.CreateScope())
{ {