Skip to content

Commit

Permalink
SNOW-1729244 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dstempniak committed Oct 9, 2024
1 parent 6b8bbd4 commit 972e90a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,12 @@ public void TestInvalidTimestampConversion(SFDataType dataType, Type unsupported
object unsupportedObject;
if (unsupportedType == typeof(DateTimeOffset))
unsupportedObject = new DateTimeOffset();
else
else if (unsupportedType == typeof(DateTime))
unsupportedObject = new DateTime();
else
unsupportedObject = null;

Assert.NotNull(unsupportedType);
SnowflakeDbException ex = Assert.Throws<SnowflakeDbException>(() => SFDataConverter.csharpValToSfVal(dataType, unsupportedObject));
SnowflakeDbExceptionAssert.HasErrorCode(ex, SFError.INVALID_DATA_CONVERSION);
}
Expand Down

0 comments on commit 972e90a

Please sign in to comment.