diff --git a/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs b/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs index fc2e8b274..181b0b87a 100755 --- a/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs @@ -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(() => SFDataConverter.csharpValToSfVal(dataType, unsupportedObject)); SnowflakeDbExceptionAssert.HasErrorCode(ex, SFError.INVALID_DATA_CONVERSION); }