public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj is PathProxy) { PathProxy that = ( PathProxy )obj; return(Arrays.Equals(this._nodes, that._nodes) && Arrays.Equals(this._relationships, that._relationships)); } else if (obj is Path) { Path other = ( Path )obj; if (_nodes[0] != other.StartNode().Id) { return(false); } return(iteratorsEqual(this.Relationships().GetEnumerator(), other.Relationships().GetEnumerator())); } else { return(false); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldIterateThroughNodesInReverse() public virtual void ShouldIterateThroughNodesInReverse() { // given Path path = new PathProxy(_proxySPI, new long[] { 1, 2, 3 }, new long[] { 100, 200 }, new int[] { 0, ~0 }); IEnumerator <Node> iterator = path.ReverseNodes().GetEnumerator(); Node node; // then //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(node = iterator.next(), instanceOf(typeof(Node))); assertEquals(3, node.Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(node = iterator.next(), instanceOf(typeof(Node))); assertEquals(2, node.Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(node = iterator.next(), instanceOf(typeof(Node))); assertEquals(1, node.Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(iterator.hasNext()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldIterateThroughRelationshipsInReverse() public virtual void ShouldIterateThroughRelationshipsInReverse() { // given Path path = new PathProxy(_proxySPI, new long[] { 1, 2, 3 }, new long[] { 100, 200 }, new int[] { 0, ~0 }); IEnumerator <Relationship> iterator = path.ReverseRelationships().GetEnumerator(); Relationship relationship; // then //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(relationship = iterator.next(), instanceOf(typeof(Relationship))); assertEquals(200, relationship.Id); assertEquals(3, relationship.StartNodeId); assertEquals(2, relationship.EndNodeId); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(relationship = iterator.next(), instanceOf(typeof(Relationship))); assertEquals(100, relationship.Id); assertEquals(1, relationship.StartNodeId); assertEquals(2, relationship.EndNodeId); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(iterator.hasNext()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldIterateAlternatingNodesAndRelationships() public virtual void ShouldIterateAlternatingNodesAndRelationships() { // given Path path = new PathProxy(_proxySPI, new long[] { 1, 2, 3 }, new long[] { 100, 200 }, new int[] { 0, ~0 }); IEnumerator <PropertyContainer> iterator = path.GetEnumerator(); PropertyContainer entity; // then //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(entity = iterator.next(), instanceOf(typeof(Node))); assertEquals(1, (( Entity )entity).Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(entity = iterator.next(), instanceOf(typeof(Relationship))); assertEquals(100, (( Entity )entity).Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(entity = iterator.next(), instanceOf(typeof(Node))); assertEquals(2, (( Entity )entity).Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(entity = iterator.next(), instanceOf(typeof(Relationship))); assertEquals(200, (( Entity )entity).Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertThat(entity = iterator.next(), instanceOf(typeof(Node))); assertEquals(3, (( Entity )entity).Id); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(iterator.hasNext()); }
public IteratorAnonymousInnerClass5(PathProxy outerInstance) { this.outerInstance = outerInstance; }
public IteratorAnonymousInnerClass4(PathProxy outerInstance) { this.outerInstance = outerInstance; i = outerInstance.nodes.Length; }
public IteratorAnonymousInnerClass2(PathProxy outerInstance) { this.outerInstance = outerInstance; i = outerInstance.relationships.Length; }