//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void useTraverserInsideTraverser() public virtual void UseTraverserInsideTraverser() { /* * (a)-->(b)-->(c) * | * \/ * (d)-->(e)-->(f) * */ CreateGraph("a FIRST d", "a TO b", "b TO c", "d TO e", "e TO f"); using (Transaction tx = BeginTx()) { TraversalDescription firstTraverser = GraphDb.traversalDescription().relationships(RelationshipType.withName("FIRST")).evaluator(Evaluators.toDepth(1)); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final Iterable<org.neo4j.graphdb.Path> firstResult = firstTraverser.traverse(getNodeWithName("a")); IEnumerable <Path> firstResult = firstTraverser.Traverse(GetNodeWithName("a")); IEnumerable <Node> startNodesForNestedTraversal = new IterableWrapperAnonymousInnerClass(this, firstResult); TraversalDescription nestedTraversal = GraphDb.traversalDescription().evaluator(Evaluators.atDepth(2)); ExpectPaths(nestedTraversal.Traverse(startNodesForNestedTraversal), "a,b,c", "d,e,f"); tx.Success(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void traverseWithIterableForStartNodes() public virtual void TraverseWithIterableForStartNodes() { /* * (a)-->(b)-->(c) * (d)-->(e)-->(f) * */ CreateGraph("a TO b", "b TO c", "d TO e", "e TO f"); using (Transaction tx = BeginTx()) { TraversalDescription basicTraverser = GraphDb.traversalDescription().evaluator(Evaluators.atDepth(2)); ICollection <Node> startNodes = new List <Node>(); startNodes.Add(GetNodeWithName("a")); startNodes.Add(GetNodeWithName("d")); IEnumerable <Node> iterableStartNodes = startNodes; ExpectPaths(basicTraverser.Traverse(iterableStartNodes), "a,b,c", "d,e,f"); tx.Success(); } }