public void WhenDbExists_ThenSetQueryStoreOff() { var connString = GetConnectionString(GetDbName()); MsSqlServer.DeployDacpac(connString, TestFiles.Dacpac); Act(connString); MsSqlServer.DropDatabase(connString); }
public void WhenDbExists_ThenDropDb() { var connString = GetConnectionString(GetDbName()); MsSqlServer.DeployDacpac(connString, TestFiles.Dacpac); Act(connString); var exists = MsSqlServer.Exists(connString); Assert.That(exists, Is.False); }
public void WhenDbExists_ThenReturnTrue() { var connString = GetConnectionString(GetDbName()); MsSqlServer.DeployDacpac(connString, TestFiles.Dacpac); var result = Act(connString); Assert.That(result, Is.True); MsSqlServer.DropDatabase(connString); }
public void WhenDbDoesNotExist_ThenCreateDb() { var connString = GetConnectionString(GetDbName()); MsSqlServer.DeployDacpac(connString, TestFiles.Dacpac); var exists = MsSqlServer.Exists(connString); Assert.That(exists, Is.True); MsSqlServer.DropDatabase(connString); }
public void WhenDacpacDoesNotExist_ThenThrowException() { var connString = GetConnectionString(GetDbName()); Assert.Throws <InvalidOperationException>(() => MsSqlServer.DeployDacpac(connString, @".\DoesNotExist.dacpac")); }