andreachild commented on code in PR #3168:
URL: https://github.com/apache/tinkerpop/pull/3168#discussion_r2241096375


##########
gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONReaderTests.cs:
##########
@@ -108,6 +108,19 @@ public void ShouldDeserializeDateToDateTimeOffset(int 
version)
             Assert.Equal(expectedDateTimeOffset, deserializedValue);
         }
         
+        [Theory, MemberData(nameof(Versions))]
+        public void ShouldDeserializeOffsetDateTimeToDateTimeOffset(int 
version)
+        {
+            const string graphSon = 
"{\"@type\":\"gx:OffsetDateTime\",\"@value\":\"2016-10-04T12:17:22.5520000+00:00\"}";
+            var reader = CreateStandardGraphSONReader(version);
+        
+            var jsonElement = 
JsonSerializer.Deserialize<JsonElement>(graphSon);
+            var deserializedValue = reader.ToObject(jsonElement);
+        
+            var expectedDateTimeOffset = TestUtils.FromJavaTime(1475583442552);

Review Comment:
   ```suggestion
               const string dateTimeString = 
"2016-10-04T12:17:22.5520000+00:00";
               const string graphSon = 
"{\"@type\":\"gx:OffsetDateTime\",\"@value\":\"" + dateTimeString + "\"}";
               var reader = CreateStandardGraphSONReader(version);
           
               var jsonElement = 
JsonSerializer.Deserialize<JsonElement>(graphSon);
               var deserializedValue = reader.ToObject(jsonElement);
           
               var expectedDateTimeOffset = 
DateTimeOffset.Parse(dateTimeString);
   ```



-- 
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: commits-unsubscr...@tinkerpop.apache.org

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

Reply via email to