Skip to content

Commit

Permalink
Remove unnecessary strings and removed commented code.
Browse files Browse the repository at this point in the history
  • Loading branch information
birschick-bq committed Mar 19, 2024
1 parent 2f614bd commit c100f8f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions csharp/test/Drivers/Interop/Snowflake/ErrorHandlingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public ErrorHandlingTests(ITestOutputHelper output)
/// Tests for invalid table and column names
/// </summary>
[SkippableTheory]
[InlineData("NUMERIC", "0", "INVALID_TABLE_NAME", null, new[] { "[Snowflake] 002003 (42S02)" /*, "SQL compilation error", "Object 'INVALID_TABLE_NAME' does not exist or not authorized" */ })]
[InlineData("NUMERIC", "0", null, "INVALID_" + DefaultColumnName, new[] { "[Snowflake] 000904 (42000)" /*, "SQL compilation error", "invalid identifier 'INVALID_" + DefaultColumnName + "'" */ })]
[InlineData("NUMERIC", "0", null, "\"" + DefaultColumnNameLower + "\"", new[] { "[Snowflake] 000904 (42000)" /*, "SQL compilation error", "invalid identifier '\"column_name\"'" */ })]
[InlineData("NUMERIC", "0", "INVALID_TABLE_NAME", null, new[] { "002003", "42S02" })]
[InlineData("NUMERIC", "0", null, "INVALID_" + DefaultColumnName, new[] { "000904", "42000" })]
[InlineData("NUMERIC", "0", null, "\"" + DefaultColumnNameLower + "\"", new[] { "000904", "42000" })]
public void TestInvalidObjectName(string columnSpecification, string sourceValue, string overrideTableName, string overrideColumnName, string[] expectedExceptionMessage = null)
{
InitializeTest(columnSpecification, sourceValue, out string columnName, out string tableName);
Expand All @@ -71,12 +71,12 @@ public void TestInvalidObjectName(string columnSpecification, string sourceValue
/// Tests for invalid syntax.
/// </summary>
[SkippableTheory]
[InlineData("NUMERIC", "0", null, DefaultColumnName + ",", new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "syntax error", "unexpected 'AS'" */ })]
[InlineData("NUMERIC", "0", null, "," + DefaultColumnName, new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "syntax error", "unexpected ','" */ })]
[InlineData("NUMERIC", "0", null, "'" + DefaultColumnName, new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "parse error", "near '<EOF>'." */ })]
[InlineData("NUMERIC", "0", null, DefaultColumnName + "'", new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "parse error", "near '<EOF>'" */ })]
[InlineData("NUMERIC", "0", null, "\"" + DefaultColumnName, new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "parse error", "near '<EOF>'" */ })]
[InlineData("NUMERIC", "0", null, DefaultColumnName + "\"", new[] { "[Snowflake] 001003 (42000)" /*, "SQL compilation error", "parse error", "near '<EOF>'" */ })]
[InlineData("NUMERIC", "0", null, DefaultColumnName + ",", new[] { "001003", "42000" })]
[InlineData("NUMERIC", "0", null, "," + DefaultColumnName, new[] { "001003", "42000" })]
[InlineData("NUMERIC", "0", null, "'" + DefaultColumnName, new[] { "001003", "42000" })]
[InlineData("NUMERIC", "0", null, DefaultColumnName + "'", new[] { "001003", "42000" })]
[InlineData("NUMERIC", "0", null, "\"" + DefaultColumnName, new[] { "001003", "42000" })]
[InlineData("NUMERIC", "0", null, DefaultColumnName + "\"", new[] { "001003", "42000" })]
public void TestInvalidSyntax(string columnSpecification, string sourceValue, string overrideTableName, string overrideColumnName, string[] expectedExceptionMessage = null)
{
InitializeTest(columnSpecification, sourceValue, out string columnName, out string tableName);
Expand Down

0 comments on commit c100f8f

Please sign in to comment.