Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillKurdyukov committed Sep 5, 2024
1 parent 483bae2 commit cb54d8e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/Ydb.Sdk/tests/Ado/YdbConnectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ INSERT INTO {tableName}
{
Assert.True(ydbDataReader.IsDBNull(i));
}

Assert.False(await ydbDataReader.ReadAsync());

ydbCommand.CommandText = $"DROP TABLE {tableName}";
Expand Down
42 changes: 21 additions & 21 deletions src/Ydb.Sdk/tests/Value/BasicUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,26 +183,26 @@ public void OptionalPrimitiveTypesMakeGet()
var valueJsonDocument = "{\"type\": \"jsondoc\"}";
Assert.Equal(valueJsonDocument, YdbValue.MakeOptionalJsonDocument(valueJsonDocument).GetOptionalJsonDocument());

Assert.Null(YdbValue.MakeOptionalBool(null).GetOptionalBool());
Assert.Null(YdbValue.MakeOptionalInt8(null).GetOptionalInt8());
Assert.Null(YdbValue.MakeOptionalUint8(null).GetOptionalUint8());
Assert.Null(YdbValue.MakeOptionalInt16(null).GetOptionalInt16());
Assert.Null(YdbValue.MakeOptionalUint16(null).GetOptionalUint16());
Assert.Null(YdbValue.MakeOptionalInt32(null).GetOptionalInt32());
Assert.Null(YdbValue.MakeOptionalUint32(null).GetOptionalUint32());
Assert.Null(YdbValue.MakeOptionalInt64(null).GetOptionalInt64());
Assert.Null(YdbValue.MakeOptionalUint64(null).GetOptionalUint64());
Assert.Null(YdbValue.MakeOptionalFloat(null).GetOptionalFloat());
Assert.Null(YdbValue.MakeOptionalDouble(null).GetOptionalDouble());
Assert.Null(YdbValue.MakeOptionalDate(null).GetOptionalDate());
Assert.Null(YdbValue.MakeOptionalDatetime(null).GetOptionalDatetime());
Assert.Null(YdbValue.MakeOptionalTimestamp(null).GetOptionalTimestamp());
Assert.Null(YdbValue.MakeOptionalInterval(null).GetOptionalInterval());
Assert.Null(YdbValue.MakeOptionalString(null).GetOptionalString());
Assert.Null(YdbValue.MakeOptionalUtf8(null).GetOptionalUtf8());
Assert.Null(YdbValue.MakeOptionalYson(null).GetOptionalYson());
Assert.Null(YdbValue.MakeOptionalJson(null).GetOptionalJson());
Assert.Null(YdbValue.MakeOptionalJsonDocument(null).GetOptionalJsonDocument());
Assert.Null(YdbValue.MakeOptionalBool().GetOptionalBool());
Assert.Null(YdbValue.MakeOptionalInt8().GetOptionalInt8());
Assert.Null(YdbValue.MakeOptionalUint8().GetOptionalUint8());
Assert.Null(YdbValue.MakeOptionalInt16().GetOptionalInt16());
Assert.Null(YdbValue.MakeOptionalUint16().GetOptionalUint16());
Assert.Null(YdbValue.MakeOptionalInt32().GetOptionalInt32());
Assert.Null(YdbValue.MakeOptionalUint32().GetOptionalUint32());
Assert.Null(YdbValue.MakeOptionalInt64().GetOptionalInt64());
Assert.Null(YdbValue.MakeOptionalUint64().GetOptionalUint64());
Assert.Null(YdbValue.MakeOptionalFloat().GetOptionalFloat());
Assert.Null(YdbValue.MakeOptionalDouble().GetOptionalDouble());
Assert.Null(YdbValue.MakeOptionalDate().GetOptionalDate());
Assert.Null(YdbValue.MakeOptionalDatetime().GetOptionalDatetime());
Assert.Null(YdbValue.MakeOptionalTimestamp().GetOptionalTimestamp());
Assert.Null(YdbValue.MakeOptionalInterval().GetOptionalInterval());
Assert.Null(YdbValue.MakeOptionalString().GetOptionalString());
Assert.Null(YdbValue.MakeOptionalUtf8().GetOptionalUtf8());
Assert.Null(YdbValue.MakeOptionalYson().GetOptionalYson());
Assert.Null(YdbValue.MakeOptionalJson().GetOptionalJson());
Assert.Null(YdbValue.MakeOptionalJsonDocument().GetOptionalJsonDocument());
}

[Fact]
Expand Down Expand Up @@ -283,7 +283,7 @@ public void DecimalType()
Assert.Equal(excepted, (decimal?)(YdbValue)(decimal?)value);
}

Assert.Null(YdbValue.MakeOptionalDecimal(null).GetOptionalDecimal());
Assert.Null(YdbValue.MakeOptionalDecimal().GetOptionalDecimal());
Assert.Null((decimal?)(YdbValue)(decimal?)null);

Assert.Equal("Decimal with precision (30, 0) can't fit into (22, 9)",
Expand Down

0 comments on commit cb54d8e

Please sign in to comment.