public async Task GetTableColumns_WhenConnectionIsNull_ShouldThrowException() { // Arrange var queryBuilderResolverMock = GetSimpleQueryBuilderResolverMock(); var sqlDeterminator = GetSimpleSQLServerDataTypeDeterminatorMock(); var instance = new SQLServerQueryExecutor(queryBuilderResolverMock, sqlDeterminator); // Act/Assert await Assert.ThrowsAsync <ArgumentNullException>(async() => await instance.GetTableColumns(null, "my_table")); }
public void Constructor_WhenGivenValidQueryBuilderResolver_ShouldReturnInstance() { // Arrange var queryBuilderResolverMock = GetSimpleQueryBuilderResolverMock(); var sqlDeterminator = GetSimpleSQLServerDataTypeDeterminatorMock(); // Act var instance = new SQLServerQueryExecutor(queryBuilderResolverMock, sqlDeterminator); // Assert Assert.NotNull(instance); }