Feature/more tests (#154)

* First batch of new tests for increasing code coverage

* Fix for merge

* Added comments to tests
This commit is contained in:
Mitchell Sternke
2016-11-22 09:55:15 -08:00
committed by GitHub
parent db1e4ae351
commit 2e3bd3ae27
2 changed files with 85 additions and 0 deletions

View File

@@ -720,6 +720,22 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Connection
Assert.True(SqlSchemaModelErrorCodes.IsInterpretationErrorCode(Interpretation.InterpretationBaseCode+ 1));
Assert.True(SqlSchemaModelErrorCodes.IsStatementFilterError(StatementFilter.StatementFilterBaseCode + 1));
}
[Fact]
public void RetryCallbackEventArgsTest()
{
var exception = new Exception();
var timespan = TimeSpan.FromMinutes(1);
// Given a RetryCallbackEventArgs object with certain parameters
var args = new RetryCallbackEventArgs(5, exception, timespan);
// If I check the properties on the object
// Then I expect the values to be the same as the values I passed into the constructor
Assert.Equal(5, args.RetryCount);
Assert.Equal(exception, args.Exception);
Assert.Equal(timespan, args.Delay);
}
}
}