fixes db testing context

This commit is contained in:
Paul Schneider 2019-05-24 20:14:38 +01:00
commit 7271649638
3 changed files with 35 additions and 9 deletions

View file

@ -82,9 +82,9 @@ namespace test
_logger = value;
}
}
public bool DbCreated { get; private set; }
//
public ServerSideFixture()
{
@ -141,8 +141,6 @@ namespace test
cx.Close();
}
}
/* Needs a connection string parsing */
public void CreateTestDb()
{
if (!DbCreated)
@ -157,6 +155,7 @@ namespace test
_logger.LogInformation($"database created.");
cx.Close();
}
DbCreated=true;
}
public void DropTestDb()
{
@ -171,7 +170,9 @@ namespace test
_logger.LogInformation($"database dropped");
cx.Close();
}
DbCreated=false;
}
public void Dispose()
{
Logger.LogInformation("Disposing");