Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldRemoveConnections()
        internal virtual void ShouldRemoveConnections()
        {
            _tracker.add(_connection1);
            _tracker.add(_connection2);
            _tracker.add(_connection3);

            _tracker.remove(_connection2);
            assertThat(_tracker.activeConnections(), containsInAnyOrder(_connection1, _connection3));

            _tracker.remove(_connection1);
            assertThat(_tracker.activeConnections(), containsInAnyOrder(_connection3));
        }
Пример #2
0
 public override void OnClosed(Connection connection)
 {
     if (connection is JettyHttpConnection)
     {
         _connectionTracker.remove(( JettyHttpConnection )connection);
     }
 }