public override Connection NewConnection(Connector connector, EndPoint endPoint) { JettyHttpConnection connection = CreateConnection(connector, endPoint); connection.addListener(_connectionListener); return(configure(connection, connector, endPoint)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveId() internal virtual void ShouldHaveId() { Connector connector = ConnectorMock("https"); JettyHttpConnection connection = NewConnection(connector); assertEquals("http-1", connection.Id()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldNotifyAboutClosedConnection() internal virtual void ShouldNotifyAboutClosedConnection() { JettyHttpConnection connection = mock(typeof(JettyHttpConnection)); _listener.onClosed(connection); verify(_connectionTracker, never()).add(any()); verify(_connectionTracker).remove(connection); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveUsernameAndUserAgent() internal virtual void ShouldHaveUsernameAndUserAgent() { JettyHttpConnection connection = NewConnection(ConnectorMock("http+routing")); assertNull(connection.Username()); connection.UpdateUser("hello", "my-http-driver/1.2.3"); assertEquals("hello", connection.Username()); assertEquals("my-http-driver/1.2.3", connection.UserAgent()); }
public static void UpdateUserForCurrentConnection(string username, string userAgent) { JettyHttpConnection connection = CurrentJettyHttpConnection; if (connection != null) { connection.UpdateUser(username, userAgent); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveConnector() internal virtual void ShouldHaveConnector() { JettyHttpConnection connection = NewConnection(ConnectorMock("http+routing")); assertEquals("http+routing", connection.Connector()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveConnectTime() internal virtual void ShouldHaveConnectTime() { JettyHttpConnection connection = NewConnection(ConnectorMock("http")); assertThat(connection.ConnectTime(), greaterThan(0L)); }