ptupitsyn commented on code in PR #1460:
URL: https://github.com/apache/ignite-3/pull/1460#discussion_r1055118878
##########
modules/platforms/dotnet/Apache.Ignite.Tests/Proto/BinaryTuple/BinaryTupleTests.cs:
##########
@@ -645,6 +645,120 @@ public void TestDefault()
Assert.AreEqual(default(LocalDateTime), reader.GetDateTime(0));
}
+ [Test]
+ public void TestGetNullable()
+ {
+ var reader = BuildAndRead((ref BinaryTupleBuilder b) =>
b.AppendNull());
+
+ Assert.IsNull(reader.GetIntNullable(0));
+ Assert.IsNull(reader.GetByteNullable(0));
+ Assert.IsNull(reader.GetShortNullable(0));
+ Assert.IsNull(reader.GetLongNullable(0));
+ Assert.IsNull(reader.GetDoubleNullable(0));
+ Assert.IsNull(reader.GetFloatNullable(0));
+ Assert.IsNull(reader.GetDecimalNullable(0, 123));
+ Assert.IsNull(reader.GetNumberNullable(0));
+ Assert.IsNull(reader.GetStringNullable(0));
+ Assert.IsNull(reader.GetBitmaskNullable(0));
+ Assert.IsNull(reader.GetGuidNullable(0));
+ Assert.IsNull(reader.GetBytesNullable(0));
+ Assert.IsNull(reader.GetDurationNullable(0));
+ Assert.IsNull(reader.GetPeriodNullable(0));
+ Assert.IsNull(reader.GetTimeNullable(0));
+ Assert.IsNull(reader.GetDateNullable(0));
+ Assert.IsNull(reader.GetDateTimeNullable(0));
+ }
+
+ [Test]
+ public void TestAppendNullable()
+ {
+ var guid = Guid.NewGuid();
Review Comment:
I think this looks clear enough as it is. Extracting `1` into a constant
just makes the test longer.
Some things have to be defined upfront - you can't inline `Guid.NewGuid` or
`UtcNow`, so we do that when necessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]