kenhuuu commented on code in PR #2738:
URL: https://github.com/apache/tinkerpop/pull/2738#discussion_r1728058573


##########
gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TraversalTests.cs:
##########
@@ -98,6 +98,17 @@ public void ShouldDrainAllTraversersWhenIterateIsCalled()
 
             Assert.Null(drainedTraversal.Next());
         }
+        
+        [Fact]
+        public void ShouldReturnNullWhenTraverserIsEmpty()
+        {
+            var someObjs = new List<object?>();
+            var traversal = new TestTraversal(someObjs);
+
+            var emptyTraversal = traversal.Iterate();
+
+            Assert.Null(emptyTraversal.Next());

Review Comment:
   I'm not sure if returning `null` is the more proper behavior. `Iterate()` is 
called on the Traversal which will move to the end of the enumerator. Then 
`Next()` is called which I think would be reasonable to throw an exception.



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

Reply via email to