//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void enterStreaming(org.neo4j.bolt.v1.transport.socket.client.TransportConnection connection, int sleepSeconds) throws Exception private void EnterStreaming(TransportConnection connection, int sleepSeconds) { ConnectAndPerformBoltHandshake(connection); connection.Send(Util.chunk(new InitMessage("TestClient/1.1", emptyMap()))); assertThat(connection, Util.eventuallyReceives(msgSuccess())); SECONDS.sleep(sleepSeconds); // sleep a bit to allow worker thread return back to the pool connection.Send(Util.chunk(new RunMessage("UNWIND RANGE (1, 100) AS x RETURN x"))); assertThat(connection, Util.eventuallyReceives(msgSuccess())); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void createAndRollback(org.neo4j.bolt.v1.transport.socket.client.TransportConnection client) throws Exception private void createAndRollback(TransportConnection client) { client.Send(createAndRollback); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.hamcrest.Matcher<java.util.Map<? extends String,?>> entryMatcher = hasEntry(is("fields"), equalTo(emptyList())); Matcher <IDictionary <string, ?> > entryMatcher = hasEntry(@is("fields"), equalTo(emptyList())); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.hamcrest.Matcher<java.util.Map<String,?>> messageMatcher = org.hamcrest.CoreMatchers.allOf(entryMatcher, hasKey("result_available_after")); Matcher <IDictionary <string, ?> > messageMatcher = CoreMatchers.allOf(entryMatcher, hasKey("result_available_after")); assertThat(client, _outerInstance.util.eventuallyReceives(msgSuccess(messageMatcher), msgSuccess(), msgSuccess(messageMatcher), msgSuccess(), msgSuccess(messageMatcher), msgSuccess())); // Verify no visible data client.Send(matchAll); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.hamcrest.Matcher<java.util.Map<? extends String,?>> fieldsMatcher = hasEntry(is("fields"), equalTo(singletonList("n"))); Matcher <IDictionary <string, ?> > fieldsMatcher = hasEntry(@is("fields"), equalTo(singletonList("n"))); assertThat(client, _outerInstance.util.eventuallyReceives(msgSuccess(CoreMatchers.allOf(fieldsMatcher, hasKey("result_available_after"))), msgSuccess())); }
private void SendMessage(IMessage message) { var serializedMessage = Protocol.SerializeMessage(message); TransportConnection.Send(serializedMessage); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void init(org.neo4j.bolt.v1.transport.socket.client.TransportConnection client) throws Exception private void init(TransportConnection client) { client.Send(init); assertThat(client, _outerInstance.util.eventuallyReceives(msgSuccess())); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void exitStreaming(org.neo4j.bolt.v1.transport.socket.client.TransportConnection connection) throws Exception private void ExitStreaming(TransportConnection connection) { connection.Send(Util.chunk(DiscardAllMessage.INSTANCE)); assertThat(connection, Util.eventuallyReceives(msgSuccess())); }