Address warnings and (some) nullables (#2013)

This commit is contained in:
Cheena Malhotra
2023-04-18 20:57:13 -07:00
committed by GitHub
parent d56f2309da
commit 648d7dbd3c
83 changed files with 674 additions and 588 deletions

View File

@@ -29,14 +29,14 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Connection
/// </summary>
public class ReliableConnectionTests
{
internal class TestDataTransferErrorDetectionStrategy : DataTransferErrorDetectionStrategy
internal sealed class TestDataTransferErrorDetectionStrategy : DataTransferErrorDetectionStrategy
{
public bool InvokeCanRetrySqlException(SqlException exception)
{
return CanRetrySqlException(exception);
}
}
internal class TestSqlAzureTemporaryAndIgnorableErrorDetectionStrategy : SqlAzureTemporaryAndIgnorableErrorDetectionStrategy
internal sealed class TestSqlAzureTemporaryAndIgnorableErrorDetectionStrategy : SqlAzureTemporaryAndIgnorableErrorDetectionStrategy
{
public TestSqlAzureTemporaryAndIgnorableErrorDetectionStrategy()
: base (new int[] { 100 })
@@ -54,7 +54,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Connection
}
}
internal class TestFixedDelayPolicy : FixedDelayPolicy
internal sealed class TestFixedDelayPolicy : FixedDelayPolicy
{
public TestFixedDelayPolicy(
IErrorDetectionStrategy strategy,
@@ -77,7 +77,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Connection
}
}
internal class TestProgressiveRetryPolicy : ProgressiveRetryPolicy
internal sealed class TestProgressiveRetryPolicy : ProgressiveRetryPolicy
{
public TestProgressiveRetryPolicy(
IErrorDetectionStrategy strategy,
@@ -97,7 +97,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Connection
}
}
internal class TestTimeBasedRetryPolicy : TimeBasedRetryPolicy
internal sealed class TestTimeBasedRetryPolicy : TimeBasedRetryPolicy
{
public TestTimeBasedRetryPolicy(
IErrorDetectionStrategy strategy,
@@ -916,7 +916,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Connection
command.UpdatedRowSource = UpdateRowSource.None;
Assert.AreEqual(UpdateRowSource.None, command.UpdatedRowSource);
Assert.NotNull(command.GetUnderlyingCommand());
Assert.Throws<InvalidOperationException>(() => command.ValidateConnectionIsSet());
Assert.Throws<InvalidOperationException>(command.ValidateConnectionIsSet);
command.Prepare();
Assert.NotNull(command.CreateParameter());
command.Cancel();