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:
Karl Burtram
2016-12-14 13:49:42 -08:00
committed by GitHub
parent e9398f7182
commit dd41e0545a
29 changed files with 921 additions and 99 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -235,7 +235,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
return _command;
}
private void ValidateConnectionIsSet()
internal void ValidateConnectionIsSet()
{
if (_connection == null)
{

View File

@@ -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)
{
}
}
}

View File

@@ -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)