//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testTraverseRelationshipsWithStartNodeNotIncluded() public virtual void TestTraverseRelationshipsWithStartNodeNotIncluded() { using (Transaction transaction = BeginTx()) { TraversalDescription traversal = GraphDb.traversalDescription().evaluator(excludeStartPosition()); assertEquals(1, Iterables.count(traversal.Traverse(Node("1")).relationships())); } }
private void TestCIsReturnedOnDepthTwo(TraversalDescription description) { using (Transaction transaction = BeginTx()) { description = description.Expand(PathExpanders.forTypeAndDirection(_one, OUTGOING)); int i = 0; foreach (Path position in description.Traverse(Node("A"))) { assertEquals(i++, position.Length()); } } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void traverseThroughNodeWithLoop() public virtual void TraverseThroughNodeWithLoop() { /* * (a)-->(b)-->(c)-->(d)-->(e) * / \ / \ * \__/ \__/ */ CreateGraph("a TO b", "b TO c", "c TO c", "c TO d", "d TO d", "d TO e"); using (Transaction tx = BeginTx()) { Node a = GetNodeWithName("a"); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.graphdb.Node e = getNodeWithName("e"); Node e = GetNodeWithName("e"); Evaluator onlyEndNode = path => Evaluation.ofIncludes(path.endNode().Equals(e)); TraversalDescription basicTraverser = GraphDb.traversalDescription().evaluator(onlyEndNode); ExpectPaths(basicTraverser.Traverse(a), "a,b,c,d,e"); ExpectPaths(basicTraverser.Uniqueness(Uniqueness.RELATIONSHIP_PATH).traverse(a), "a,b,c,d,e", "a,b,c,c,d,e", "a,b,c,d,d,e", "a,b,c,c,d,d,e"); tx.Success(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetStartNodeWhenAtIsZeroBreadthFirst() public virtual void ShouldGetStartNodeWhenAtIsZeroBreadthFirst() { TraversalDescription description = GraphDb.traversalDescription().breadthFirst().evaluator(Evaluators.atDepth(0)); ExpectNodes(description.Traverse(GetNodeWithName("2")), "2"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetCorrectNodesAtDepthZero() public virtual void ShouldGetCorrectNodesAtDepthZero() { TraversalDescription description = GraphDb.traversalDescription().evaluator(Evaluators.fromDepth(0)).evaluator(Evaluators.toDepth(0)); ExpectNodes(description.Traverse(GetNodeWithName("6")), "6"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetCorrectNodeAtDepthOne() public virtual void ShouldGetCorrectNodeAtDepthOne() { TraversalDescription description = GraphDb.traversalDescription().evaluator(Evaluators.atDepth(1)); ExpectNodes(description.Traverse(GetNodeWithName("6")), "5"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldGetSecondNodeWhenFromToIsTwoBreadthFirst() public virtual void ShouldGetSecondNodeWhenFromToIsTwoBreadthFirst() { TraversalDescription description = GraphDb.traversalDescription().breadthFirst().evaluator(Evaluators.fromDepth(2)).evaluator(Evaluators.toDepth(2)); ExpectNodes(description.Traverse(GetNodeWithName("5")), "2"); }
private void ShouldGetBothNodesOnDepthOne(TraversalDescription description) { description = description.Evaluator(atDepth(1)); ExpectNodes(description.Traverse(GetNodeWithName("3")), "1", "2"); }