Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/572#discussion_r106519004
--- Diff:
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
---
@@ -191,6 +200,58 @@ public void doTest() {
{__.V().as("a").optional(bothE().dedup().as("b")).
choose(select("b"), select("a","b"),
project("a").by(select("a"))),
"[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a,
b]]]", null},
+ {__.V().as("a").out().select("a").program(new
MockVertexProgram(
+ new
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH)))), "[]", null}
});
}
-}
+
+ // do nothing mock vertex program for traverser requirement testing
+ private static class MockVertexProgram implements VertexProgram<Tuple>
{
--- End diff --
thanks - unless the concrete mock ends up being generally useful to lots of
tests or the mockito mock is insanely complicated to the point where no one
will understand it, i tend to prefer mockito mocks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---