//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void ensureCorrectPathEntitiesInShortPath() public virtual void EnsureCorrectPathEntitiesInShortPath() { /* * (a)-->(b) */ CreateGraph("a TO b"); Node a = GetNodeWithName("a"); Node b = GetNodeWithName("b"); Relationship r = a.GetSingleRelationship(To, OUTGOING); Path path = Iterables.single(GraphDb.bidirectionalTraversalDescription().mirroredSides(GraphDb.traversalDescription().relationships(To, OUTGOING).uniqueness(NODE_PATH)).collisionEvaluator(Evaluators.atDepth(1)).sideSelector(SideSelectorPolicies.LEVEL, 1).traverse(a, b)); AssertContainsInOrder(path.Nodes(), a, b); AssertContainsInOrder(path.ReverseNodes(), b, a); AssertContainsInOrder(path.Relationships(), r); AssertContainsInOrder(path.ReverseRelationships(), r); AssertContainsInOrder(path, a, r, b); assertEquals(a, path.StartNode()); assertEquals(b, path.EndNode()); assertEquals(r, path.LastRelationship()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void multipleCollisionEvaluators() public virtual void MultipleCollisionEvaluators() { /* * (g) * ^ \ * / v * (a)-->(b) (c) * | --^ ^ * v / | * (d)-->(e)----(f) */ CreateGraph("a TO b", "b TO g", "g TO c", "a TO d", "d TO e", "e TO c", "e TO f", "f TO c"); ExpectPaths(GraphDb.bidirectionalTraversalDescription().mirroredSides(GraphDb.traversalDescription().uniqueness(NODE_PATH)).collisionEvaluator(Evaluators.atDepth(3)).collisionEvaluator(includeIfContainsAll(GetNodeWithName("e"))).traverse(GetNodeWithName("a"), GetNodeWithName("c")), "a,d,e,c"); }