//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void visit(org.neo4j.cypher.result.QueryResult_Record record) throws Exception public void visit(Org.Neo4j.Cypher.result.QueryResult_Record record) { if (_pull) { _outerInstance.messageWriter.write(new RecordMessage(record)); } }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || !(o is Org.Neo4j.Cypher.result.QueryResult_Record)) { return(false); } Org.Neo4j.Cypher.result.QueryResult_Record that = (Org.Neo4j.Cypher.result.QueryResult_Record)o; return(Arrays.Equals(_fields, that.Fields())); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldEncodeRecordMessage() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldEncodeRecordMessage() { // Given Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = mock(typeof(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer)); RecordMessageEncoder encoder = new RecordMessageEncoder(); // When Org.Neo4j.Cypher.result.QueryResult_Record value = mock(typeof(Org.Neo4j.Cypher.result.QueryResult_Record)); when(value.Fields()).thenReturn(new AnyValue[0]); encoder.Encode(packer, new RecordMessage(value)); // Then verify(packer).packStructHeader(anyInt(), eq(RecordMessage.SIGNATURE)); verify(packer).packListHeader(0); }
protected internal override bool matchesSafely(Org.Neo4j.Cypher.result.QueryResult_Record item) { if (_expectedFieldValues.Length != item.Fields().Length) { return(false); } for (int i = 0; i < item.Fields().Length; i++) { if (!_expectedFieldValues[i].matches(item.Fields()[i])) { return(false); } } return(true); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldLogErrorIfIsFatalError() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldLogErrorIfIsFatalError() { Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = mock(typeof(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer)); Log log = mock(typeof(Log)); FailureMessageEncoder encoder = new FailureMessageEncoder(log); // When Org.Neo4j.Cypher.result.QueryResult_Record value = mock(typeof(Org.Neo4j.Cypher.result.QueryResult_Record)); when(value.Fields()).thenReturn(new AnyValue[0]); FatalFailureMessage message = new FatalFailureMessage(Org.Neo4j.Kernel.Api.Exceptions.Status_General.UnknownError, "I am an error message"); encoder.Encode(packer, message); // Then verify(log).debug("Encoding a fatal failure message to send. Message: %s", message); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldEncodeFailureMessage() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldEncodeFailureMessage() { // Given Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = mock(typeof(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer)); Log log = mock(typeof(Log)); FailureMessageEncoder encoder = new FailureMessageEncoder(log); // When Org.Neo4j.Cypher.result.QueryResult_Record value = mock(typeof(Org.Neo4j.Cypher.result.QueryResult_Record)); when(value.Fields()).thenReturn(new AnyValue[0]); encoder.Encode(packer, new FailureMessage(Org.Neo4j.Kernel.Api.Exceptions.Status_General.UnknownError, "I am an error message")); // Then verify(log, never()).debug(anyString(), any(typeof(FailureMessage))); verify(packer).packStructHeader(anyInt(), eq(FailureMessage.SIGNATURE)); verify(packer).packMapHeader(2); verify(packer).pack("code"); verify(packer).pack("message"); }
public RecordMessage(Org.Neo4j.Cypher.result.QueryResult_Record record) { this._value = record; }
public virtual Org.Neo4j.Cypher.result.QueryResult_Record[] Records() { Org.Neo4j.Cypher.result.QueryResult_Record[] recordArray = new Org.Neo4j.Cypher.result.QueryResult_Record[_records.Count]; return(_records.toArray(recordArray)); }
public virtual void AddRecord(Org.Neo4j.Cypher.result.QueryResult_Record record) { _records.Add(record); }
public void visit(Org.Neo4j.Cypher.result.QueryResult_Record record) { }