mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
Add tests to improve code coverage (#187)
* DbColumn and ReliableConnection tests * More retry connection tests * More tests * Fix broken peek definition integration tests * Fix test bug * Add a couple batch tests * Add some more tests * More tests for code coverage. * Validation and Diagnostic tests * A few more tests * A few mote test changes. * Update file path tests to run on Windows only
This commit is contained in:
@@ -48,12 +48,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
internal const string DoNotSerializeQueryStoreSettingsIndex = "DoNotSerializeQueryStoreSettings";
|
||||
internal const string AlwaysEncryptedWizardMigrationIndex = "AlwaysEncryptedWizardMigration";
|
||||
|
||||
private static readonly AmbientData _defaultSettings;
|
||||
internal static AmbientData _defaultSettings;
|
||||
|
||||
static AmbientSettings()
|
||||
{
|
||||
_defaultSettings = new AmbientData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Access to the default ambient settings. Access to these settings is made available
|
||||
|
||||
@@ -801,7 +801,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
public string DatabaseName;
|
||||
}
|
||||
|
||||
private static bool TryGetConnectionStringBuilder(string connectionString, out SqlConnectionStringBuilder builder)
|
||||
internal static bool TryGetConnectionStringBuilder(string connectionString, out SqlConnectionStringBuilder builder)
|
||||
{
|
||||
builder = null;
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
return _command;
|
||||
}
|
||||
|
||||
private void ValidateConnectionIsSet()
|
||||
internal void ValidateConnectionIsSet()
|
||||
{
|
||||
if (_connection == null)
|
||||
{
|
||||
|
||||
@@ -34,5 +34,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
[Serializable]
|
||||
internal sealed class RetryLimitExceededException : Exception
|
||||
{
|
||||
internal RetryLimitExceededException() : base()
|
||||
{
|
||||
}
|
||||
|
||||
internal RetryLimitExceededException(string m, Exception e) : base(m, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
}
|
||||
*/
|
||||
|
||||
private static int? GetErrorNumber(Exception ex)
|
||||
internal static int? GetErrorNumber(Exception ex)
|
||||
{
|
||||
SqlException sqlEx = ex as SqlException;
|
||||
if (sqlEx == null)
|
||||
|
||||
Reference in New Issue
Block a user