dispose
This commit is contained in:
parent
ab3c383d43
commit
7b6124ae22
2 changed files with 8 additions and 5 deletions
|
|
@ -230,7 +230,7 @@ namespace yavscTests
|
|||
WebHostBuilder = new WebHostBuilder();
|
||||
webhostengnine = WebHostBuilder
|
||||
.UseEnvironment("Development")
|
||||
.UseServer("Yavsc")
|
||||
.UseServer("yavscTests")
|
||||
.UseStartup<Yavsc.Startup>()
|
||||
.Build();
|
||||
WebApp = webhostengnine.Start();
|
||||
|
|
@ -240,9 +240,9 @@ namespace yavscTests
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
WebApp.Dispose();
|
||||
|
||||
Logger.LogInformation("Disposing");
|
||||
if (DbCreated) DropTestDb();
|
||||
if (WebApp!=null) WebApp.Dispose();
|
||||
if (Logger!=null) Logger.LogInformation("Disposing");
|
||||
}
|
||||
|
||||
public bool DbCreated { get {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,10 @@ namespace yavscTests.Mandatory
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_serverFixture.DropTestDb();
|
||||
if (_serverFixture!=null)
|
||||
{
|
||||
_serverFixture.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue