vnext
Paul Schneider 3 years ago
parent 136cb32301
commit bb1c9f7bf4
2 changed files with 8 additions and 5 deletions

@ -230,7 +230,7 @@ namespace yavscTests
WebHostBuilder = new WebHostBuilder(); WebHostBuilder = new WebHostBuilder();
webhostengnine = WebHostBuilder webhostengnine = WebHostBuilder
.UseEnvironment("Development") .UseEnvironment("Development")
.UseServer("Yavsc") .UseServer("yavscTests")
.UseStartup<Yavsc.Startup>() .UseStartup<Yavsc.Startup>()
.Build(); .Build();
WebApp = webhostengnine.Start(); WebApp = webhostengnine.Start();
@ -240,9 +240,9 @@ namespace yavscTests
public void Dispose() public void Dispose()
{ {
WebApp.Dispose(); if (DbCreated) DropTestDb();
if (WebApp!=null) WebApp.Dispose();
Logger.LogInformation("Disposing"); if (Logger!=null) Logger.LogInformation("Disposing");
} }
public bool DbCreated { get { public bool DbCreated { get {

@ -41,7 +41,10 @@ namespace yavscTests.Mandatory
public void Dispose() public void Dispose()
{ {
_serverFixture.DropTestDb(); if (_serverFixture!=null)
{
_serverFixture.Dispose();
}
} }
} }

Loading…