You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/23 18:50:26 UTC

[GitHub] [ignite] ptupitsyn commented on a change in pull request #8568: IGNITE-12824 .NET: Add BinaryConfiguration.TimestampConverter

ptupitsyn commented on a change in pull request #8568:
URL: https://github.com/apache/ignite/pull/8568#discussion_r548131924



##########
File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDateTimeTest.cs
##########
@@ -134,10 +133,22 @@ public void TestCustomTimestampConverter()
 
             AssertTimestampField<DateTimeObj2>((o, d) => o.Value = d, o => o.Value, "Value");
 
-            var ex = Assert.Throws<BinaryObjectException>(() => binary.ToBinary<IBinaryObject>(new DateTime(1997, 8, 29)), 
-                "Converter Error!");
+            var dt1 = new DateTime(1997, 8, 29, 0, 0, 0, DateTimeKind.Utc);
+
+            var ex = Assert.Throws<BinaryObjectException>(() => binary.ToBinary<DateTime>(dt1));
+            Assert.AreEqual("ToJavaTicks Error!", ex.Message);

Review comment:
       Let's extract a constant to avoid repeating `"ToJavaTicks Error!"` value.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org